[wp-hackers] Limiting editor on backend based on usermeta key

Joaquin Rodriguez Montero yojoaquin at gmail.com
Wed Feb 20 12:33:44 UTC 2013


Hi guys,

I've been searching and searching and I can't find the right or even one(!)
approach to this:
1) I have groups of users based on a usermeta key -> associated with a
single custom post type thanks to Advanced Custom Fields plugin.
2) I have 3 roles: owner, editor, consultant. The first two are WP
'editors' and the 'consultant' can only create but do not edit even it's
own posts (yet to figure out if I can do this last bit).
3) Question is: I need to allow the users within it's a group to be able to
see their own posts on the Posts list on the backend. I bet it has
something to do with if is admin grab current user usermeta_key
'group_name' then grab users ID's with that key value and set the query to
show only those authors ids, right? if so or.. if not so (ha) could you
point me out the direction for this please? I'd also like to restrict the
access to posts that have not been created by the same group of authors.

Thanks in advanced!

Joaquin


More information about the wp-hackers mailing list