正如标题所说,我需要在database
中创建一个动态menu stored
作为树,并且有计划在其上放置一个接口。现在,我需要决定如何实施基于适合此要求的市场的Access Control Layer
。如何将Java安全层(Apache Shiro | Spring Security)集成到webapp菜单系统
我大量使用Spring IoC
,spring mvc
等....与hibernate
为我的项目。我以前使用过apache shiro
,这并不坏。只是社区还很年轻,所以需要花时间回答关于shiro有贡献的问题,而且没有大量文档。
我还在使用shiro
反正刨,因为我的经验,我没有与spring security
。现在第一个问题应该是是是一个好主意,以配合ACL菜单系统|网站导航系统如果有人能分享他的经验,我会很高兴。
所以在我的头顶,我有一点users
,roles
,rights
,users_rights
,roles_users
这种模式,roles_rights
users //contains creds and user detail
roles //contains roles
rights // contains rights (including menu entries matching rights, if i have to tie them)
roles_users //many-to-many roles-users with extra columns mapped as entity
roles_rights // many-to-many roles-rights with extra columns mapped as entity
users_rights //many-to-many users-rights mapped as entity with extra columns. special rights for user and overwrite the overall rights given by roles. can deny rights given by a role or add rights not inside any roles
所以在权利表我能有这样的:
id
name // in the form of admin:users:list
description
menu_name // unique name what shows on page
menu_url
唯一的问题是我该如何处理子菜单?自我多对多的权利? 最后它变得如此复杂。所以我想要有其他的观点,见解,建议。谢谢
您好,非常感谢您的回复。所以没有什么是错的结构和我如何概念化acl +菜单? –
在我的小见解中,这很好 –