• The situation is this:
    My wordpress W has categores C1, which has a subcategory C11, and C2.
    group G only can see and write category C2.
    user U is in group G.
    Lock recursive is On

    And W has 3 posts:

    • P1 in C1 and C11
    • P2 in C11
    • P3 in C2

    W should show to U only P3, but it’s showing P2 and P3.

    The problem is in UamAccessHandler::getExcludedPosts(). The SQL query, just exclude the categories I configured. With Lock recursive on, the subcategories are not in the table and are not excluded.

    I think the problem is here:

    AND tt.term_id IN (
        			SELECT gc.object_id
        			FROM ".DB_ACCESSGROUP." iag
        			INNER JOIN ".DB_ACCESSGROUP_TO_OBJECT." AS gc
        				ON iag.id = gc.group_id
        			WHERE gc.object_type = 'category'
        			AND iag.".$accessType."_access != 'all'
        			AND gc.object_id NOT IN (".$categoriesAssignedToUserString.")

    But I don’t know how to change it.
    Anyone could help me?

    https://www.ads-software.com/extend/plugins/user-access-manager/

  • The topic ‘UAM not blocking subcategories’ is closed to new replies.