You can allow user to edit the selected set of posts or pages or custom post types only. When it could be useful? Suppose you need to give the user ability to edit someone other’s post. But if you simply give that user “edit_others_posts” capability, such user will can edit any posts created by other authors. In this situation “User Role Editor Pro” may help you. Just restrict user access for editing selected posts and pages only.
In order to start use this feature You need to turn on the “Activate user access management to editing selected posts and pages” option at the “User Role Editor” settings page in order to put this module in action.
Please note, that if you did not turn on the “Activate “Create Post/Page” capability” option (located above) earlier, it will be turned on automatically with “Activate user access management to editing selected posts and pages” option together.
After turning on needed options and saving changes go to the users list, select user, and click “Edit” under his row to open user profile. Scroll it to the “Posts/Pages Editor Restrictions” section and input allowed or prohibited posts/pages/custom post types ID comma separated list into the text input field “edit posts/pages/custom post types with ID (comma separated)”. Take into account that user should can edit posts (edit_posts) or pages (edit_pages) or one of the custom post types (related edit capability). “Posts/Pages Editor Restrictions” section is hidden in other case.
That’s it. When this user login next time, he will see just posts and pages allowed for him. Creation of new posts and pages will be prohibited for him also. Option “Activate “Create” capability for posts/pages/custom post types” forces WordPress to use ‘create_posts’, ‘create_pages’ capabilities, which are not granted automatically to the roles except ‘administrator’.
For better understanding look the short support video showing the process described above:
It is possible to select posts from the posts list and allow/prohibit access for editing them to the group of users at one time. Go to the “Posts/Pages”, select needed posts or pages, select bulk action “Edit Access” and click “Apply”.
IDs of selected posts/pages will be inserted into dialog window automatically. Input users ID and data will be saved to users profiles.
It’s possible to setup edit restriction for the selected role also. Go to “Users->User Role Editor”, select role, which you wish to restrict and click “Posts Edit” button:
You will see the “Posts edit access” window:
Field “With author user ID” is shown for user (role) only if edit_others_posts and/or edit_others_pages capability was granted to user (role).
The list of allowed/restricted pages is extended automatically by the all child pages of parent pages included to this list. If you wish to switch this OFF use ure_auto_access_child_pages filter.
Detailed complex example of view/edit access restrictions in action is available here.