Derive Macro near_contract_tools::Rbac
source · #[derive(Rbac)]
{
// Attributes available to this derive:
#[rbac]
}
Expand description
Adds role-based access control. No external methods are exposed.
The roles prefix must be specify a type using #[rbac(roles = “MyRoles”)]. Typically “MyRoles” is an enum and it’s variants are the different role names.
The storage key prefix for the fields can be optionally specified (default:
"~r"
) using #[rbac(storage_key = "<expression>")]
.