Expand description
Role-Based Access Control (RBAC) authorizer.
This module provides an RbacAuthorizer that maps roles to a set of
permissions and answers can(action, resource) queries. Permissions may
be either action:resource pairs or a wildcard * that grants full access.
§角色层级(Role Hierarchy)
v0.2.3 新增:角色可继承父角色的权限。例如 editor 继承 viewer 的权限,
admin 继承 editor 的权限。继承通过 RbacAuthorizer::with_role_parent
配置,授权时会沿继承链向上查找。
Structs§
- Rbac
Authorizer - Role-based authorizer backed by a
role -> permissionsmap.