#4 权限管理

Open
created 1 year ago by wqm · 3 comments
wqm commented 1 year ago
wqm commented 1 year ago
Owner
权限控制在数据库层面涉及到三个表litemall_admin, litemall_role和litemall_permission: * litemalladmin表中存在roleId字段,保存角色ID数组; * litemallrole表记录角色名称和角色介绍; * litemall_permission表记录角色所用于的权限值。
wqm commented 1 year ago
Owner
权限控制在后端层面通过这三个表可以构建出管理员所属的角色以及所拥有的操作权限。 当管理员登录以后,访问一些受权限保护的后端地址时,后端会验证当前管理员的操作权限和后端地址需要的操作权限; 如果不匹配则会抛出异常,然后前端就会收到无操作权限的提示信息。
wqm commented 1 year ago
Owner
权限控制在前端层面可以简单地把无操作权限显示给用户即可。 但是前端可以进一步优化完成菜单权限特性和按钮权限特性: * 菜单权限,即管理员登录以后,前端的菜单是自动生成的; * 按钮权限,即管理员点击菜单跳转到页面,而页面中只出现当前管理员可操作的按钮。
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.