尝试在JHipster 2.27.2
生成的项目中添加新角色(ROLE_MANAGERS)。我可以看到需要更新的表(角色,权限和role_authority映射)。
如何添加新角色?
答案 0 :(得分:0)
At the moment in JHipster the roles/authorities are not exposed over a restful resource.
So there are 2 options for you to proceed:
you find a file src/main/resources/config/liquibase/authorites.csv and add all the roles you need. They will be generated as soon as liquibase migrates your database
implement some RestController for managing them
答案 1 :(得分:0)
Liquidbase不会自动更新将每个笔记插入JHI_AUTHORITY表所需的角色。
这还不够,因为有些js脚本有你应该更新的硬编码权限列表。
这里有一个很好的链接,它更新了更新权限角色列表的步骤: http://techknowblogs.blogspot.fr/2016/12/adding-new-role-in-jhipster.html