create hierarchy of roles on a jhipster monolithic application - jhipster

i'd like to add 4 more user roles in my monolithic jhipster application ( client , seller , membreJure , and agentService) so that every client and seller will have a personal profile ,but under the control of the agentService( an agentService will control the clients and sellers of a city)
could jhipster help in with some trics to simplify my work?

No, it's up to you to code it with the help of spring-security.

Related

How to implement Django social login using google for different type of users(eg: candidate ,employer, customer)

I want to implement Social login in my Django project. When I searched about it, I found social login for only one user. But I want to implement it for different type of users as I mentioned in the title. Can anyone suggest a solution to implement this in my project.
You can allow auto-registration to everybody. But, to be registered on your app doesn't mean user can do anything in app. Only users on group candidate , employer or customer are allowed to see data or perform operations in app.
Then, you can create views on your app to put users on group. For example, a user of the grup employer can assign users to group customer.

When using UAA how do you setup a foreign relationship to the user entity?

Other stackoverflow answers and bug reports have discussed setting a one direction relationship with the "user" entity but this won't work in a microservice using UAA authentication because there is no JHI_USER table in the schema.
You just can't because you're crossing service/system boundaries. Imagine you used LDAP or Active Directory to authenticate your users, the only thing you could do is to refer to a user by its login name which is basically an external ID. This is the same with UAA or between 2 microservices.

Add Team From startup event in liferay 6.2 ga4

i'm currently developing hook for user registration (jsp , action ,startup action)
i wont at startup time (application.startup.events) to create 2 teams using this code
but isn't work
Team team=TeamLocalServiceUtil.createTeam(CounterLocalServiceUtil.increment());
team.setCompanyId(companyId);
team.setName("individual");
team.setDescription("individual individual");
TeamLocalServiceUtil.addTeam(team);
could any one help me
and I've inspected team table in database there are 2 fields (companyid and groupid ) i can't see what is difference between them they are facing me any where what their benefit and how i can find them
companyId is what the UI calls "instance". Most likely you have only one. The technical name groupId typically refers to the site that you create the team in.
I'd rather advise to create the team in a single call:
Team team = TeamLocalServiceUtil.addTeam(ownerId, groupId, name, description)
If this doesn't help, please update your question with more information than "doesn't work". You can be a lot more specific.
companyId is the liferay portal instance id. If you setup liferay to be multi-tenant, this id is used to separate data between the virtual portal.
groupId is organizational or site id.It's used if you want to separate your data between organization or sites.
try below code to add team :-
Team team=teamPersistence.create(CounterLocalServiceUtil.increment(Team.class.toString()));
team.setCompanyId(companyId);
team.setName("individual");
team.setDescription("individual individual");
teamPersistence.update(team);

Adding developers to Nest account

Can I add other developers to my Nest account? I would like each member of my team to have their own Nest user account but share the same client and test devices.
Unfortunately not at this time.
The best practice with the current setup would be to create a group Nest Account for development (using a group email address, most IT departments have self-service for this) and a separate account for production (which you should do anyways)
If you would like to suggest better account management features, the best place to do so is on the Product Suggestions board in the Nest Community.

have different roles in different companies symfony 2.0

I'm triying to develop an application which will contain different kinds of companies, and each company will have different roles.
This way, when a superadmin create a company, will define which roles can be attached to this kind of company.
For example, the superadmin could create a shopping center which could have a shop assistant and a director (each of them with different permissions); and another kind of companny which could be a coffee shop, which could have a waiter and a chef.
Then, when an user loggin inside the application, and will want to create a new user, will only have the possibility of select the roles of his kind of company.
But I can't see the way to develop, using the security.yml file and the FOSUserBUndle.
Thanks in advance!
For this kind of purpose, I think you need to implement your security logic inside controllers ; with security.yml you can restrict some entire areas, but I don't think it will help in your case. Maybe you can first define some routes that would be accessible only to some roles (for example, "/waiter/*" for waiters)
Then you can implement like a new kind of roles ; each company can have a field "possible_roles" that will be an array of roles. For example, if a superadmin creates a coffee shop, then you will have possible_roles = { "ROLE_WAITER", "ROLE_CHEF" }
After that you just have to check if the user's role is in the company role's array, and if he has access to the page.
Is it clear ?

Resources