[wp-hackers] Partial admin capabilities
rbilesky at gmail.com
Tue Jul 27 22:40:33 UTC 2010
Thanks for the ideas. I'll try them if I can figure out how, neither is all
that well documented in the codex, just red links to non existant pages.
But i'll see if I can figure it out.
On Tue, Jul 27, 2010 at 3:12 PM, Andrew Nacin <wp at andrewnacin.com> wrote:
> On Tue, Jul 27, 2010 at 6:02 PM, Ryan Bilesky <rbilesky at gmail.com> wrote:
> > I want to write a plugin where everytime something that requires the
> > capability install_plugins (for example) is required it also adds the
> > condition that the current user's userid is 1. The purpose of this would
> > be
> > to restrict certain actions to just me, even though I have other
> > "administrators" on the blog, I want them to have some of the admin
> > capabilities but not all,
> It would probably be easier to just leverage the map_meta_cap filter. And
> tack on the 'do_not_allow' capability whenever the user isn't you, and it's
> a capability you don't want others to have. Check out how map_meta_cap()
> works toward the bottom -- core does this exact thing.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers