1

I have three user roles

  1. Merchant
  2. Seller
  3. End User

Merchant has more permissions privileges than Seller. Merchant can become a seller or an end user. When i created a user, i assigned all three roles to that user. But when the user is logged in, by default he should only have Merchant privileges. But he can switch to seller or End user from a drop down. The user will not have all permission privileges (Merchant + Seller + End User) at a time. He will only have a single role at a time. Is there any way to achieve this.

0

1 Answer 1

1

There are couple of module available to do this job. Hope this will be helpful

1. Masquerade

The Masquerade module allows site administrators (or anyone with enough permissions) to switch users and surf the site as that user (no password required). That person can switch back to their own user account at any time.

2. Role Switcher

Role Switcher module provides with an option to change role for testing purposes. It creates 'roleswitcher' role and grants it permission to administer permissions which makes possible to switch back to the original role the user had. The module provides a roleswitcher block and a page, /roleswitcher.

5
  • 2
    Did you read the description of "Masquerade" ? The Masquerade module allows site administrators (or anyone with enough permissions) to switch users and surf the site as that user (no password required). That person can switch back to their own user account at any time. It is not useful for switch between roles!!! also Role switcher is not suitable for productive project( it is only for devel jobs)
    – Yuseferi
    Sep 9, 2015 at 11:04
  • I had gone through both. Why i am switching roles because i need to minimize the load of a user and make the things simple.
    – drup
    Sep 9, 2015 at 11:07
  • @drup they are not good solution for what you want, If I'll getting free I wrote better solution for you
    – Yuseferi
    Sep 9, 2015 at 11:21
  • @drup : what do you mean by "minimize load of a user"? I have the impression that you are rather looking for "a technique" to somehow organize (split) the tasks to be completed by each of these 3 types (roles) of user, no? If that's what you want, then try to edit your question to make that clear. Sep 9, 2015 at 18:09
  • I am showing certain blocks to each roles in a page. If the user has all roles (Merchant + Seller + End User), it will display all the blocks which makes the page complex. I need to avoid this.
    – drup
    Sep 10, 2015 at 4:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.