RBAC中 permission , role, rule 的理解

Role Based Access Control (RBAC)——基於角色的權限控制

 

permission

e.g. creating posts, updating postsapp

role

A role represents a collection of permissions (e.g. creating posts, updating posts). A role may be assigned to one or multiple users.ide

rule

A rule represents a piece of code that will be executed during access check to determine if the corresponding role or permission applies to the current user. For example, the "update post" permission may have a rule that checks if the current user is the post creator. During access checking, if the user is NOT the post creator, he/she will be considered not having the "update post" permission.post

 

Both roles and permissions can be organized in a hierarchy. In particular, a role may consist of other roles or permissions; and a permission may consist of other permissions.code

圖例1:ip

圖例2:權限控制

相關文章
相關標籤/搜索