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.

This topic contains 8 replies, has 2 voices, and was last updated by  Vladimir 2 weeks, 5 days ago.

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

    cityoflawrenceks
    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

    cityoflawrenceks
    Participant

    Yes, the CPT has its own custom taxonomy.

    #5715

    cityoflawrenceks
    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

    cityoflawrenceks
    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

    cityoflawrenceks
    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.