[wp-trac] Re: [WordPress Trac] #2775: Ability for all users to add
users of lesser cabable roles
WordPress Trac
wp-trac at lists.automattic.com
Mon Jun 5 07:23:47 GMT 2006
#2775: Ability for all users to add users of lesser cabable roles
----------------------------+-----------------------------------------------
Id: 2775 | Status: new
Component: Administration | Modified: Mon Jun 5 07:23:47 2006
Severity: enhancement | Milestone:
Priority: normal | Version: 2.1
Owner: doit-cu | Reporter: doit-cu
----------------------------+-----------------------------------------------
Comment (by markjaquith):
doit-cu,
Would want it to be two caps, so that someone could grant the
edit_less_capable_users cap to other users! Quis Custodiet Ipsos
Custodes? :-)
Ryan,
Patch is a good start, but we'll also need to know what is being done to
the user on a finer level.. i.e. "changing this user's role to X" or
"Adding/Removing Capability Y"
so maybe:
{{{
current_user_can('edit_user', $id, 'add_capability', 'manage_options')
OR
current_user_can('edit_user', $id, 'set_role', 'Author')
}}}
Then a plugin could hook in and grab all those extra args and make an
educated decision on whether or not the user is allowed to do that.
--
Ticket URL: <http://trac.wordpress.org/ticket/2775>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list