Jump to content

Users sermissions on specific module


Recommended Posts

Hello all,

When I edit the permissions of a employeegroup in the backend of prestashop, I can only set permission for the modules tab in the backend. It seems not to be possible to set rights to each individual module.

I have created a module to show a gallery at the fontpage, and I want one specific user to edit that gallery via this module. But this user may not use every other module in the backend.
Is it possible to assign this particular right to a user, or usergroup?

TIA

Link to comment
Share on other sites

It is not currently an option, you could modify your code to behave this way, it would probably be a fairly easy change if you want to hard code it, but if you want a solution where you have an interface to choose which use gets access to which modules, it would be much more complex.

Link to comment
Share on other sites

Thanks for your reply.
It doesn't need an interface, it is just a very 'strange' non default option for exactly one user, so it is OK to configure it with code.
Can you give me some example, or code hint to do that?

Link to comment
Share on other sites

I don't have an example, since I never did that, but this is how I would approach it.

In the admin tab for the module tab, you need to check the user group, and if it is the one you want to restrict, skip all the modules except the one you wish to show.

Link to comment
Share on other sites

If you want the permissions to apply you need to create a new tab instead of a module. It should not be hard to port the functionality to a tab. Just check the tabs folder under the admin folder. You can copy an existing tab and change it to your needs. There is an option to add a new tab under tools->tabs.

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...