User role selection

Is there any way to create a separate page to show and select the user roles which I need later on for accessing data on the page I created?  
2 answers

As I understand, you don’t want to switch the Userrole, but you want to switch a user (with a different role)

Thus replacing the demo user switcher by a page you create yourself. Right?

If so;

  1. create a page
  2. add buttons on it for each type of user
  3. Connect it to a new Nanoflow
  4. Add to this nanoflow the sign-in action from the nanoflow commons module
  5. Specify in the action the UserName & password.
  6. run and use



Since you just want to be able to assign user roles, you can do the following:

  1. Make an overview of all accounts or users (accounts are a specialization of user)
  2. Add an edit button to your grid if it's not generated automatically
  3. Generate the newedit page
  4. Add a reference selector for the Userrole entity.

Using these you can easily select and change roles for individual users.