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 has 8 replies, 2 voices, and was last updated 6 years, 6 months ago by
Vladimir.
-
AuthorPosts
-
20/05/2019 at 16:08 #5693
City Dev
ParticipantIn 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?
21/05/2019 at 08:03 #5696Vladimir
KeymasterDoes CPT has fully own taxonomy, instead of posts categories for example?
21/05/2019 at 13:33 #5699City Dev
ParticipantYes, the CPT has its own custom taxonomy.
24/05/2019 at 14:06 #5715City Dev
ParticipantFor 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.
24/05/2019 at 14:46 #5716Vladimir
KeymasterThanks for clarification. I work on the update. Beta version will be available for testing next week.
05/06/2019 at 14:23 #5747City Dev
ParticipantJust 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.
06/06/2019 at 01:39 #574806/06/2019 at 16:50 #5751City Dev
ParticipantThat appears to fix things. Based on user permissions, the CPT taxonomy is now displaying in the CPT taxonomy metabox on the CPT edit screen.
07/06/2019 at 02:11 #5752Vladimir
KeymasterThanks for the help with testing.
-
AuthorPosts
- You must be logged in to reply to this topic.