ASP.NET 样板模板中的角色和权限有什么区别?
What is the difference between Roles and Permissions in ASP.NET Boilerplate Template?
在ASP.NET Boilerplate中,为什么它有控制授权的角色和权限?两者有何区别?
角色:一组权限。
1。为什么ABP有角色和权限来控制授权?两者有什么区别?
同时拥有角色和权限可以让管理员更灵活、更轻松地控制授权。
不同的是,授权只看权限,不看角色。
来自https://aspnetboilerplate.com/Pages/Documents/Zero/Role-Management:
Roles are used to group permissions. When a user has a role, then he/she will have all the permissions of that role. A user can have multiple roles. The permissions of this user will be a merge of all the permissions of all assigned roles.
例如,可以允许站点版主添加、编辑和删除任何帖子,包括其他人撰写的帖子。站点管理员也可以添加、编辑和删除评论。如果有多个网站版主,则可以轻松地分配一个角色,而不是为每个用户分配单独的权限。
2。权限是否一定属于角色?角色是否一定需要权限?
不,权限可以直接分配给用户。
不,角色不需要权限。没有权限的角色就像一个职位(例如员工)。
来自https://aspnetboilerplate.com/Pages/Documents/Zero/Permission-Management:
Role Permissions
If we grant a permission to a role, all the users that have this role are authorized for the permission (unless explicitly prohibited for a specific user).
User Permissions
While the role-based permission management can be enough for most applications, we may need to control the permissions per user. When we define a permission setting for a user, it overrides the permission setting defined for the roles of the user.
此外,还有组织单位角色(尚未记录)。也就是说,可以将角色分配给组织单位,并且该组织单位中的用户被视为具有该角色。
在ASP.NET Boilerplate中,为什么它有控制授权的角色和权限?两者有何区别?
角色:一组权限。
1。为什么ABP有角色和权限来控制授权?两者有什么区别?
同时拥有角色和权限可以让管理员更灵活、更轻松地控制授权。
不同的是,授权只看权限,不看角色。
来自https://aspnetboilerplate.com/Pages/Documents/Zero/Role-Management:
Roles are used to group permissions. When a user has a role, then he/she will have all the permissions of that role. A user can have multiple roles. The permissions of this user will be a merge of all the permissions of all assigned roles.
例如,可以允许站点版主添加、编辑和删除任何帖子,包括其他人撰写的帖子。站点管理员也可以添加、编辑和删除评论。如果有多个网站版主,则可以轻松地分配一个角色,而不是为每个用户分配单独的权限。
2。权限是否一定属于角色?角色是否一定需要权限?
不,权限可以直接分配给用户。
不,角色不需要权限。没有权限的角色就像一个职位(例如员工)。
来自https://aspnetboilerplate.com/Pages/Documents/Zero/Permission-Management:
Role Permissions
If we grant a permission to a role, all the users that have this role are authorized for the permission (unless explicitly prohibited for a specific user).
User Permissions
While the role-based permission management can be enough for most applications, we may need to control the permissions per user. When we define a permission setting for a user, it overrides the permission setting defined for the roles of the user.
此外,还有组织单位角色(尚未记录)。也就是说,可以将角色分配给组织单位,并且该组织单位中的用户被视为具有该角色。