Change WordPress user roles and capabilities › Forums › Restrict or Permit access inside WordPress – how to › Allow user to edit selected posts and pages only
- This topic has 8 replies, 2 voices, and was last updated 8 years, 10 months ago by Vladimir.
-
AuthorPosts
-
18/01/2016 at 10:07 #1896pierremareParticipant
Hi Vladimir, love your plugin firstly.
I just purchased a license so that I can allow a user role access to edit posts from specific author’s only. I am not sure if I have done something wrong, but when I click on All users -> Select the user -> I scroll down to see the option to Allow or Prohibit to edit posts/pages/custom post types:
I see only two options, not three
1. with post ID (comma separated)
2. with category/taxonomy ID (comma separated)There is no option for Author User ID which is what I need specifically,
Please help!
18/01/2016 at 10:21 #1897pierremareParticipantHi Again,
The option to input author ID appears when I update the capability of the role to Edit Other’s posts.
If I put author ID’s in there, will this ensure that they can only edit posts by that author ID and not all other posts?Thanks very much!
18/01/2016 at 10:27 #1898VladimirKeymasterHi Pierre,
Thanks for the good feedback.
If I put author ID’s in there, will this ensure that they can only edit posts by that author ID and not all other posts?
Absolutely correct. Access to the all others posts will be blocked in this case by User Role Editor.
18/01/2016 at 10:29 #1899pierremareParticipantThanks for your quick reply. It seems that on the front end they can view all others posts though. Is there a way to ensure they can only view the specified author ID posts as well as well? This is very important for my client…
18/01/2016 at 11:20 #1900VladimirKeymasterAll posts are available for view at the front-end by default.
There is a way to restrict posts available at the front-end for view by the logged-in user:
It does not include ‘by author ID’ feature though. I see that such option will be useful. I will add it to the some of the future versions.Currently, it’s possible to use some tag or category as a workaround – setup such ‘Posts View’ restriction for role, assigned to this author.
If it’s not acceptable for your client I may provide a piece of code for functions.php in order users of some role will see at the front-end just the posts for which they are authors.
18/01/2016 at 11:26 #1901pierremareParticipantHi Vladimir, thanks again for your help it is so valuable. I would massively appreciate a snippet of code I could use so that a user with User/Author ID of X is restricted to only be able to view posts on the front end with Author/user ID of X,Y and Z etc.
Would that be possible please please please?
18/01/2016 at 16:49 #1902pierremareParticipantVladimir you genius, I just started using your suggested workaround of restricting user roles to specific categories and this is a perfect workaround. Thank you so much. I have you are or become a rich man 🙂
18/01/2016 at 16:59 #1903pierremareParticipantJust some feedback for a future version. When I use the “restrict post view” function for the categories I don’t want the user profile to view on the front end and backend of the site, the category names still appear in the back end post edit screen when filtering all posts by category. You cant actually read or see the posts for the restricted categories – just all the category titles in the filter’s drop down. It would be good that these are hidden from the drop down also. I hope the plugins don’t clash, but by using your plugin combined with a plugin called “Restrict Categories” – it fixes the issue as a workaround 🙂
19/01/2016 at 01:41 #1904VladimirKeymasterHi Pierre,
Thanks for letting me know that you found a workaround. I had write a promised code sample if you did not.
Thanks for the suggestion about categories drop-down list at the back-end posts list. I will fix this.
-
AuthorPosts
- You must be logged in to reply to this topic.