Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] #2689: Add permission token definition parameters #2694

Conversation

Arjentix
Copy link
Contributor

@Arjentix Arjentix commented Sep 3, 2022

Description of the Change

  • Added parameters to PermissionTokenDefinition. They contain param name and param type.
  • Added token parameters checking when granting a new permission to an account
  • Added token parameters checking when registering a new role
  • Added tests for both Grant<Account, PermissionToken and Register<Role>

Issue

Benefits

Possible Drawbacks

API breaking change. That will hurt a little bit for SDK-developers

Usage Examples or Tests

cargo test --package iroha_client --test mod -- integration::permissions::token_parameters --nocapture 

@Arjentix Arjentix added Enhancement New feature or request iroha2-dev The re-implementation of a BFT hyperledger in RUST api-changes Changes in the API for client libraries Yellow labels Sep 3, 2022
@Arjentix Arjentix self-assigned this Sep 3, 2022
@codecov
Copy link

codecov bot commented Sep 3, 2022

Codecov Report

Merging #2694 (b5c61ba) into iroha2-dev (a16d9c3) will decrease coverage by 1.93%.
The diff coverage is 66.76%.

@@              Coverage Diff               @@
##           iroha2-dev    #2694      +/-   ##
==============================================
- Coverage       67.61%   65.67%   -1.94%     
==============================================
  Files             140      166      +26     
  Lines           26173    29894    +3721     
==============================================
+ Hits            17696    19633    +1937     
- Misses           8477    10261    +1784     
Impacted Files Coverage Δ
actor/src/actor_id.rs 90.00% <ø> (ø)
actor/src/deadlock.rs 100.00% <ø> (ø)
cli/derive/src/lib.rs 92.30% <ø> (+17.58%) ⬆️
cli/src/event.rs 41.86% <ø> (ø)
cli/src/main.rs 1.09% <0.00%> (-0.26%) ⬇️
cli/src/stream.rs 81.39% <ø> (ø)
cli/src/torii/mod.rs 28.88% <0.00%> (ø)
client/src/http.rs 47.82% <ø> (ø)
client/src/http_default.rs 41.59% <ø> (-18.59%) ⬇️
client_cli/src/main.rs 0.27% <0.00%> (+0.01%) ⬆️
... and 213 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Erigara Erigara self-assigned this Sep 4, 2022
@appetrosyan appetrosyan self-assigned this Sep 5, 2022
data_model/src/permissions.rs Outdated Show resolved Hide resolved
data_model/src/lib.rs Outdated Show resolved Hide resolved
data_model/src/lib.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/world.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/world.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/permissions/checks.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/permissions/checks.rs Outdated Show resolved Hide resolved
configs/peer/genesis.json Show resolved Hide resolved
client/tests/integration/permissions.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/permissions/checks.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/permissions/checks.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/permissions/checks.rs Outdated Show resolved Hide resolved
data_model/src/permissions.rs Outdated Show resolved Hide resolved
data_model/src/permissions.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/permissions/checks.rs Outdated Show resolved Hide resolved
client/tests/integration/permissions.rs Outdated Show resolved Hide resolved
client/tests/integration/permissions.rs Outdated Show resolved Hide resolved
client/tests/integration/permissions.rs Outdated Show resolved Hide resolved
client/tests/integration/permissions.rs Outdated Show resolved Hide resolved
client/tests/integration/permissions.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/permissions/checks.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/permissions/checks.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/triggers.rs Outdated Show resolved Hide resolved
data_model/src/lib.rs Outdated Show resolved Hide resolved
Erigara
Erigara previously approved these changes Sep 5, 2022
Erigara
Erigara previously approved these changes Sep 5, 2022
appetrosyan
appetrosyan previously approved these changes Sep 5, 2022
data_model/src/permissions.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/permissions/checks.rs Outdated Show resolved Hide resolved
data_model/src/permissions.rs Outdated Show resolved Hide resolved
@Arjentix Arjentix dismissed stale reviews from appetrosyan and Erigara via 7a62c36 September 5, 2022 13:35
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
… 'origin/iroha2-dev'.

Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
… 'iroha2-dev'.

Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
@Arjentix Arjentix force-pushed the permission_token_definition_parameters branch from 57a3d29 to f7635d2 Compare September 16, 2022 08:51
data_model/src/lib.rs Outdated Show resolved Hide resolved
data_model/src/permission/token.rs Show resolved Hide resolved
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
@Arjentix Arjentix merged commit a1538c5 into hyperledger-iroha:iroha2-dev Sep 16, 2022
@Arjentix Arjentix deleted the permission_token_definition_parameters branch September 16, 2022 12:20
appetrosyan pushed a commit that referenced this pull request Oct 7, 2022
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-changes Changes in the API for client libraries Enhancement New feature or request iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants