Loading...
 
Features / Usability

Features / Usability


Category based permission troubles

posts: 1

I am having an issue with trying to hide content from users based on categories. I have set up the following:

Groups
- Registered: tiki_p_view_categories, tiki_p_view_categorized (tiki_p_view inherited from Anonymous)
- Editors: tiki_p_edit_categorized (inherits Registered)
- Users_1: (inherits Registered)
- Users_2: (inherits Registered)
- Users_3: (inherits Registered)
- Editors_1: (inherits Editors)
- Editors_2: (inherits Editors)
- Editors_3: (inherits Editors)

Users
- user_1: belongs to Users_1
- user_2: belongs to Users_2
- user_3: belongs to Users_3
- editor_1: belongs to Editors_1 and Users_1
- editor_2: belongs to Editors_2 and Users_2
- editor_3: belongs to Editors_3 and Users_3

Categories
- cat_1: tiki_p_view_categories -> Users_1, tiki_p_admin_categories -> Editors_1, Admin
- cat_2: tiki_p_view_categories -> Users_2, tiki_p_admin_categories -> Editors_2, Admin
- cat_3: tiki_p_view_categories -> Users_3, tiki_p_admin_categories -> Editors_3, Admin

I am under the assumption that a page that has been categorized 'cat_1' would only be able to be seen by anyone in Users_1 or Editors_1 groups, but user_1 is displayed a 'Permission denied you cannot view this page' when going to a page categorized in 'cat_1'.

Am I missing somthing, or are my assumptions incorrect?

tia,

Oorastard

posts: 24

I'm having similar issues trying to get the page staging feature to work (which relies on categories).

The comment section of the page staging documentation shows an extra permission called 'tiki_p_view_categorized'. This must let the group it's assigned to actually view the ITEMS in a category vs viewing the just the categories themselves (with tiki_p_view_categories).

In my case, tiki_p_view_categorized is inherited right from anonymous (which is perhaps the reason I can't specify it in category permissions) and I STILL can't view items in categories if not the administrator. I'm convinced I must be missing something basic. Something obvious...

posts: 7
I got same kind of problem when I enabled categories. Anonymous have view_categories and view_categorized rights but they can't see any items in any category (same problem with Registered). I tried to give admin_category permission for Anonymous for one category and after that they were able to see the items in that category. Why is that?

posts: 289 United States

As was stated by another poster the view_categories permission only allows you to view the categories themselves not objects categorized under them. You need to also assign the view_categorized permission too.

I have a similar need and have managed to get this working, so I know that it can be done. I would recommended retracing your steps; checking defined user groups and inherited permissions, checking the global permissions first, then finally the individual category permissions.


posts: 26
See if in Admin>Categories the setting "Permission to all (not just any) of an object's categories is required for access" is turned on. TURN IT OFF if you are using categories for both topical classification (Cars, News, Kinds of fish) and for access control.

posts: 7
I got same kind of problem when I enabled categories. Anonymous have view_categories and view_categorized rights but they can't see any items in any category (same problem with Registered). I tried to give admin_category permission for Anonymous for one category and after that they were able to see the items in that category. Why is that?
posts: 54 Germany
I got same kind of problem when I enabled categories. Anonymous have view_categories and view_categorized rights but they can't see any items in any category (same problem with Registered). I tried to give admin_category permission for Anonymous for one category and after that they were able to see the items in that category. Why is that?


If you want all Anonymous and Registered let see the categories and the items in the categories, then take away the "object-specific" permissions given to your categories (like you wrote in your first post).

=> So the global permissions given to your users will affect, that they can see the categories themself and the categorized objects.

If you then want to restrict view-permission to a category or/and the objects in it, assign specific rights only to this category like you did above.

=> So the global permissions will be overwritten by the object specific permissions (of the category and its items).

Note:

  • By assigning group permissions like tiki_p_view_categorized and tiki_p_view_categories you only give the general permission to view (categories nad items in them).

  • In the moment you assign specific permissions to an object (maybe a category) this rights will be restricted only to those users, you explicitely call there (e.g. in the category).

posts: 7
I got same kind of problem when I enabled categories. Anonymous have view_categories and view_categorized rights but they can't see any items in any category (same problem with Registered). I tried to give admin_category permission for Anonymous for one category and after that they were able to see the items in that category. Why is that?
posts: 2
Clear your ./temp/cache/. Took me 6 hours to find this--what a pain. This problem occured even after a fresh install of 2.2 The cache item "categories_permission_names" only had 2 permissions in it instead of 4. This may be because I didn't enable the "Categories" feature right away after installation, and the cache item got filled with just the 2 permissions and stayed that way. Just a guess though...

posts: 7
Sorry for triple posting redface How can I remove my post?