Deleting a branch is permanent. It CANNOT be undone. Continue?
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》
权限控制在数据库层面涉及到三个表litemall_admin, litemall_role和litemall_permission: * litemalladmin表中存在roleId字段,保存角色ID数组; * litemallrole表记录角色名称和角色介绍; * litemall_permission表记录角色所用于的权限值。
权限控制在后端层面通过这三个表可以构建出管理员所属的角色以及所拥有的操作权限。 当管理员登录以后,访问一些受权限保护的后端地址时,后端会验证当前管理员的操作权限和后端地址需要的操作权限; 如果不匹配则会抛出异常,然后前端就会收到无操作权限的提示信息。
权限控制在前端层面可以简单地把无操作权限显示给用户即可。 但是前端可以进一步优化完成菜单权限特性和按钮权限特性: * 菜单权限,即管理员登录以后,前端的菜单是自动生成的; * 按钮权限,即管理员点击菜单跳转到页面,而页面中只出现当前管理员可操作的按钮。