near-plugins 0.5.1

Ergonomic plugin system to extend NEAR contracts.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/// Represents permissions for the [`AccessControllable`](crate::AccessControllable) plugin.
pub trait AccessControlRole {
    /// Returns the names of all role variants.
    fn acl_role_variants() -> Vec<&'static str>;

    /// Returns the bitflag corresponding to the super admin permission.
    fn acl_super_admin_permission() -> u128;

    /// Returns the bitflag corresponding to the admin permission for the role.
    fn acl_admin_permission(self) -> u128;

    /// Returns the bitflag corresponding to the role's permission.
    fn acl_permission(self) -> u128;
}