[英]How to create sub-users within the company registration in jhipster
I'm new in jhipster development.我是 jhipster 开发的新手。 I want to create sub-users within the company registration with one or more different Read/Write/Hidden permissions.
我想在公司注册中创建具有一个或多个不同读/写/隐藏权限的子用户。 How to that in jhipster.Any suggestions or tutorial link for the same.
如何在 jhipster.Any 建议或教程链接相同。 Thanks in advance :)
提前致谢 :)
There is no users-and-"sub-users" system in the JHipster generated application. JHipster 生成的应用程序中没有用户和“子用户”系统。 You can use users in different ROLEs.
您可以使用不同角色的用户。
You have to adapt the constants in AuthoritiesConstants.java
used in Backend und Frontend.您必须调整后端和前端中使用的
AuthoritiesConstants.java
的常量。 Search for the jhipster default ROLE_ADMIN
and ROLE_USER
in the generated Spring and Angular code (you'll find the constants in SecurityConfiguration.java
and *jhiHasAnyAuthority
in the Angular components and authorities
in Angulars routing as well as in authorities.csv
, users_authorities.csv
and users.csv
for the initial default setup of the database(s)).搜索jhipster默认
ROLE_ADMIN
和ROLE_USER
在生成Spring和角码(你会发现在常量SecurityConfiguration.java
和*jhiHasAnyAuthority
的角度成分和authorities
在Angulars路由以及在authorities.csv
, users_authorities.csv
和users.csv
用于数据库的初始默认设置)。
In UserService.java
's createUser()
you can change the default role for a JHipster user registration.在
UserService.java
的createUser()
您可以更改 JHipster 用户注册的默认角色。
One good practical example can be found here (which is from a lesson on udemy ), but it's straightforward in JHipster.一个很好的实际例子可以在 这里找到(来自udemy 的一课),但它在 JHipster 中很简单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.