Saturday, October 23, 2010

Modx 2 Category access

By default, everyone have access to any category.
Any resources fall within those category will be editable and save by anyone who have the policy to save/edit_template/snippet/chunk.

To restrict permission, you will need to add the category into the user group with:
category: [youcategory]
min role: [member/super user]
access policy: administrator
context: mgr

Once save, you will realise, nobody will be even see the category anymore.
Solution, Running: Security > Flush permissions.
And now, only those who meet min role within mgr may see the category and the element/resources inside.

Updates Oct25: There is a bug in modx2 which doesnt allow new element to be created under the category we have provided administrator policy as set above. The work around is to create a new element without any category, and then edit the element and set category to it. It will work properly if we set the element to it.
http://bugs.modx.com/issues/2610


Okay, now if you want other user to see only those resources/element inside the category but do not want to let them edit:
Add this in the user group category:
category: [youcategory]
min role: [member/super user]
access policy: Load, List and View
context: mgr
Running: Security > Flush permissions.

If the above doesnt work, try logout and login again :)
Hope it helps :)

No comments: