Change WordPress user roles and capabilities Forums Restrict or Permit access inside WordPress – how to Unrestricted access to CPT and its taxonomies, while restricting pages/posts.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #5693
    City Dev
    Participant

    In my setup, every user starts with the ‘Staff’ role so I can globally control some permissions.

    Each user then has one or more ‘Functional’ roles that specify what content types they can access (events, forms, pages, posts, etc…).

    Finally, each user has one or more ‘Department’ roles that specify all the IDs and taxonomies they can potentially access (in conjunction with the Functional roles they have).

    The issue I’m having is that a user may have access to specific pages and posts, but is unable to have unrestricted access to all content of a specified custom post type. Instead, they can’t see any of the CPT content.

    Using the ‘ure_restrict_edit_post_type‘ code, fixes the issue of unrestricted access to the CPT content while maintaining restricted access to pages/posts. However, the CPT taxonomy is still unavailable, and is necessary for them to be able to fully manage the CPT.

    Is there a way to exclude both the CPT and it’s taxonomies from restriction?

    #5696
    Vladimir
    Keymaster

    Does CPT has fully own taxonomy, instead of posts categories for example?

    #5699
    City Dev
    Participant

    Yes, the CPT has its own custom taxonomy.

    #5715
    City Dev
    Participant

    For clarification, using the ‘ure_restrict_edit_post_type‘ code, makes it so the CPT and CPT taxonomy are both available to manage. However, the taxonomy meta box is empty on the CPT edit screen.

    So, while one can mange both the CPT and the CPT taxonomy, they can’t assign the taxonomy to anything.

    #5716
    Vladimir
    Keymaster

    Thanks for clarification. I work on the update. Beta version will be available for testing next week.

    #5747
    City Dev
    Participant

    Just checking to see if a beta version is available. Or perhaps a snippet of code that can be added while you’re working on it.

    #5748
    Vladimir
    Keymaster

    Try beta version 4.51.1.b1, it’s available after login from the Download page.

    #5751
    City Dev
    Participant

    That appears to fix things. Based on user permissions, the CPT taxonomy is now displaying in the CPT taxonomy metabox on the CPT edit screen.

    #5752
    Vladimir
    Keymaster

    Thanks for the help with testing.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.