Near-One / near-plugins

Implementation of common patterns used for NEAR smart contracts.
Creative Commons Zero v1.0 Universal
27 stars 12 forks source link

feat(Upgradable)!: use Acl for authorization #85

Closed mooori closed 1 year ago

mooori commented 1 year ago

Previously Upgradable authorization was handled by Ownable. An explanation of how to use Upgradable with Acl is available in the example contract.

Acl Roles

Use cases which don’t require fine grained permissions can define only a single role and whitelist it for all Upgradable features. See Role::DAO in the example contract.

The other roles show how to achieve more fine grained permissions by whitelisting a role only for a subset of the Upgradable features.


Edit: Some advantages of using Acl: