Change WordPress user roles and capabilities Forums Bug Reports Problem using Allow Category/Taxonomy Access

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2664
    jmtmurphey
    Participant

    I am having an issue with allowing users access by Category/Taxonomy. If I set Prohibit for a user and list the category and taxonomy ids I want to prohibit for pages and custom post types, everything works correctly, but if I set Allow and list the category and taxonomy ids I want to allow for pages and custom post types, the users sees 0 pages and custom post types. I prefer to use allow because prohibit requires entering many more ids. Is there something I am missing on setting up the Allow option?

    I am running version 4.27.1.

    #2668
    Vladimir
    Keymaster

    There are no any specials. If you set restrictions at the role level check if there is no other values set at the user profile for the testing user.

    Check if posts, pages with taxonomies listed are exist. Pages are not use taxonomies by default. If you set “Allow” with categories list, pages list will be empty as there are no pages with that taxonomy. Workaround – to add taxonomies for pages and assign some taxonomies for them or exclude page post type from the list of post types restricted for editing by URE via special filter:

    ure_restrict_edit_post_type

    #2674
    Vladimir
    Keymaster

    Problem was clarified after the conversation via email.

    Solution:

    When “Prohibit” model is selected: all posts/pages are shown except prohibited.
    When “Allow” model is selected: by default only posts/pages are shown which user can edit. If you wish to show all allowed post you may change this via filter:

    
    add_filter('ure_show_posts_which_can_edit_only_backend', function() { return false; } );
    
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.