23/03/2021 at 19:45 #7435awuParticipant
I configured a user who has the Editor role and manage_categories permission enabled. This user is restricted to edit posts for category ID = 3 (following the instructions here: https://www.role-editor.com/allow-user-edit-selected-posts/).
What to do: “Allow”
with category/taxonomy ID: 3
The user is able to see and edit posts that belong to category ID 3. When editing/creating a post, however, they are unable to add or remove tags. The API call to fetch tags returns an empty array:
Removing the value 3 from “with category/taxonomy ID” fixes the tag issue but then the user is able to edit all posts.
Since this role has the
manage_categoriespermission, the user is able to make edits to tags and categories by visiting:
Posts -> Tags
Posts -> Categories
If the user visits Posts -> All Posts and immediately visits the Tags or Categories dashboard, there will be 0 results. Refreshing the page will show the list of all tags and/or categories.
User Role Editor Pro 4.59.225/03/2021 at 12:47 #7438VladimirKeymaster
It seems as expected behavior. Restriction by category ID is global for all taxonomies. So when you all to see at backend and edit only posts with category (taxonomy) ID=3, you automatically prohibit editing posts with any other taxonomy ID. Thus use can not add to the post new tags/taxonomies.
As about 0 items at the tags or categories page, it is a result of URE’s internal caching. But if you limit user to edit post only with the restricted list of existing taxonomies – you should not allow him to edit them. You have to delegate this function to another user according to my logic. So taxonomy editing pages should not be available to a user restricted such way.25/03/2021 at 20:57 #7440awuParticipant
Thanks for the explanation. Are there any workarounds when using URE that will allow the user to tag and/or categorize the post?
User is restricted to create and edit posts that have category ID 3
User should be able to add/remove tags to these posts27/03/2021 at 11:13 #7443VladimirKeymaster
Currently there is no such workaround. Restriction is applied to all existing taxonomies at once.
I will think how to exclude selected taxonomies from the restriction using custom filter and apply this to one of the future versions.
- You must be logged in to reply to this topic.