iroha icon indicating copy to clipboard operation
iroha copied to clipboard

[BUG]: Trigger is not callable by multiple users (stable)

Open Erigara opened this issue 1 year ago • 3 comments

THIS ISSUE ALREADY FIXED ON LATEST iroha2-dev branch, however we should consider backport.

On the iroha2-stable branch, it's possible to call trigger only by single user.

This happens because ExecuteTriggerEventFilter allows accept only single account.

Solution would be to accept either single user or any user (permission to execute should be checked by executor).

Erigara avatar Apr 11 '24 10:04 Erigara

has this backport been requested by anyone?

mversic avatar Apr 15 '24 13:04 mversic

yes, it was requested by CBDC team (after discussion with @Stukalov-A-M).

Erigara avatar Apr 15 '24 14:04 Erigara

Scenario to check and automation:

  1. Register the domain "kingdom".
  2. Register the account "bob@kingdom".
  3. Register the trigger "trigger$kingdom" to mint the asset "rose#wonderland".
  4. Execute the trigger "trigger$kingdom" by the user "alice@wonderland".
  5. Grant the permission token "CanExecuteUserTrigger" to "bob@kingdom".
  6. Execute the trigger "trigger$kingdom" by the user "bob@kingdom".
  7. Revoke the permission token "CanExecuteUserTrigger" from "bob@kingdom".
  8. Attempt to execute the trigger "trigger$kingdom" again by the user "bob@kingdom".

AlexStroke avatar Jun 11 '24 15:06 AlexStroke