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 60a488d commit bc6be98
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Binary file modified configs/swarm/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 @@ -395,6 +395,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 @@ -654,6 +660,8 @@ pub mod account {
| AnyPermissionToken::CanExecuteUserTrigger(_)
| AnyPermissionToken::CanBurnUserTrigger(_)
| AnyPermissionToken::CanMintUserTrigger(_)
| AnyPermissionToken::CanSetKeyValueInTrigger(_)
| AnyPermissionToken::CanRemoveKeyValueInTrigger(_)
| AnyPermissionToken::CanUnregisterAnyPeer(_)
| AnyPermissionToken::CanUnregisterDomain(_)
| AnyPermissionToken::CanSetKeyValueInDomain(_)
Expand Down Expand Up @@ -899,6 +907,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 @@ -1597,6 +1607,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 @@ -137,6 +137,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 bc6be98

Please sign in to comment.