Skip to content

Commit

Permalink
[fix]: CanSetKeyValueInTrigger and CanRemoveKeyValueInTrigger now wor…
Browse files Browse the repository at this point in the history
…king

Signed-off-by: Shanin Roman <[email protected]>
  • Loading branch information
Erigara committed Apr 4, 2024
1 parent a3ac9dc commit 742503a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Binary file modified configs/peer/executor.wasm
Binary file not shown.
16 changes: 16 additions & 0 deletions smart_contract/executor/src/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,12 @@ pub mod domain {
AnyPermissionToken::CanMintUserTrigger(permission) => {
permission.trigger_id.domain_id().as_ref() == Some(domain_id)
}
AnyPermissionToken::CanSetKeyValueInTrigger(permission) => {
permission.trigger_id.domain_id().as_ref() == Some(domain_id)
}
AnyPermissionToken::CanRemoveKeyValueInTrigger(permission) => {
permission.trigger_id.domain_id().as_ref() == Some(domain_id)
}
AnyPermissionToken::CanUnregisterAnyPeer(_)
| AnyPermissionToken::CanGrantPermissionToCreateParameters(_)
| AnyPermissionToken::CanRevokePermissionToCreateParameters(_)
Expand Down Expand Up @@ -726,6 +732,8 @@ pub mod account {
| AnyPermissionToken::CanExecuteUserTrigger(_)
| AnyPermissionToken::CanBurnUserTrigger(_)
| AnyPermissionToken::CanMintUserTrigger(_)
| AnyPermissionToken::CanSetKeyValueInTrigger(_)
| AnyPermissionToken::CanRemoveKeyValueInTrigger(_)
| AnyPermissionToken::CanUnregisterAnyPeer(_)
| AnyPermissionToken::CanUnregisterDomain(_)
| AnyPermissionToken::CanSetKeyValueInDomain(_)
Expand Down Expand Up @@ -939,6 +947,8 @@ pub mod asset_definition {
| AnyPermissionToken::CanExecuteUserTrigger(_)
| AnyPermissionToken::CanBurnUserTrigger(_)
| AnyPermissionToken::CanMintUserTrigger(_)
| AnyPermissionToken::CanSetKeyValueInTrigger(_)
| AnyPermissionToken::CanRemoveKeyValueInTrigger(_)
| AnyPermissionToken::CanUnregisterAnyPeer(_)
| AnyPermissionToken::CanUnregisterDomain(_)
| AnyPermissionToken::CanSetKeyValueInDomain(_)
Expand Down Expand Up @@ -1517,6 +1527,12 @@ pub mod trigger {
AnyPermissionToken::CanMintUserTrigger(permission) => {
&permission.trigger_id == trigger_id
}
AnyPermissionToken::CanSetKeyValueInTrigger(permission) => {
&permission.trigger_id == trigger_id
}
AnyPermissionToken::CanRemoveKeyValueInTrigger(permission) => {
&permission.trigger_id == trigger_id
}
AnyPermissionToken::CanUnregisterAnyPeer(_)
| AnyPermissionToken::CanUnregisterDomain(_)
| AnyPermissionToken::CanSetKeyValueInDomain(_)
Expand Down
2 changes: 2 additions & 0 deletions smart_contract/executor/src/default/tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ declare_tokens! {
crate::default::tokens::trigger::{CanUnregisterUserTrigger},
crate::default::tokens::trigger::{CanMintUserTrigger},
crate::default::tokens::trigger::{CanBurnUserTrigger},
crate::default::tokens::trigger::{CanSetKeyValueInTrigger},
crate::default::tokens::trigger::{CanRemoveKeyValueInTrigger},

crate::default::tokens::executor::{CanUpgradeExecutor},
}
Expand Down

0 comments on commit 742503a

Please sign in to comment.