Switch between roles to check permissions

Hi all,

On my way of creating roles and adding permissions I wanted to check if the permissions are correctly configured. Is there a way in Drupal 8 for an admin to switch between the roles?

Kind regards,

Hi Nadine,

There used to be a module in Drupal 7, however in Drupal 8 we can’t do such switching.
The solution is that you can do it by adding a service account of yours to the different e-group/roles to test it. So if you have a role and e-group linked to it, by creating a new service account you can log in with it on your website and you will get the editor role.
However, you have to delete the service account from the e-groups when changing to another role. If you want to check the roles quickly you should create as many service accounts as you have roles because it takes few hours to synchronise.

Best regards,

Hi Kamila,

thank you for your fast answer!
How can I create a new service account?

Kind regards,

Dear Nadine,

You have to go to the website: https://account.cern.ch/account/ and create a new account. Then you have to choose service one.

Best regards,

Thank you!

Hello again,

I have created a new service account and want to add it to the corresponding e-group now, so that the role is set. But when I’m in the e-group search form I get:
“Access denied! The account ‘name’@ cern.ch is not authorized to access the requested url. Please, sign out and sign-in with your primary account.”

When I try to add the new mail address (Add member >> email or user name) logged in with my primary account, I’m adding my primary account. Therefore the role of the e-group is assigned to my primary account, but because I`m the admin, I don’t see changes. And the service account has still the default “CERN shared” role.

Could you tell me, how to add just the service account to the e-group? Or have I done something wrong in creating the service account?

Thank you in advance,

This is an e-groups issue I dont think there is much we can do.

When you are in the e-groups interface and you search by login, select the account instead of the person to be added. In that case the service account will be added instead of the primary account


Perfect, thank you!