Page 1 of 1

[SOLVED] Setting permissions for 'Products' module

Posted: Wed Jul 30, 2008 6:03 am
by oct4th
Hiya.

I've installed the Products module, and it's working greeeat, the only issue I seem to be having is setting up the user permissions. Calguy states setting up the 'modify products' permission in order for users to edit the products only, but I'm having trouble getting this to work.

I currently have a group similar to 'editor' with a few added permissions. When clicking the 'modify products' permission, users in this group still cannot access the module (it simply doesn't show up in their admin panel). But if I add either the 'modify templates' or 'modify site prefs' - as suggested in the docs - then the users can add/remove products, but then they also get their hands on other things I don't want them seeing.

Is this an issue anyone else has had, or have I boned up some other permissions somewhere?

Thanks!!

c

Re: [SOLVED] Setting permissions for 'Products' module

Posted: Wed Jul 30, 2008 7:38 am
by oct4th
Solved my own problem:

In the Products module Products.module.php file the function VisibleToAdminUser() currently looks like so:

  function VisibleToAdminUser()
  {
return $this->CheckPermission('Modify Cart') ||
  $this->CheckPermission('Modify Templates') ||
  $this->CheckPermission('Modify Site Preferences');
   }


Changing the word 'Cart' to 'Products' seems to fix the permissions issues I was having.

return $this->CheckPermission('Modify Products')

This is a bug, yeah?!

c

Re: [SOLVED] Setting permissions for 'Products' module

Posted: Wed Jul 30, 2008 8:54 am
by Deblus
thanks for the tip

Re: [SOLVED] Setting permissions for 'Products' module

Posted: Wed Jul 30, 2008 9:51 am
by oct4th
And now that I was going to post a bug, I see it's already been posted  ;D

http://dev.cmsmadesimple.org/tracker/index.php?func=detail&aid=2367&group_id=408&atid=1563

C