[wp-hackers] User Capabilities
ringmaster at midnightcircus.com
Mon Jul 11 16:22:46 GMT 2005
Ryan Boren wrote:
> Here's the patch as it currently stands.
Looks like update_user_cache() didn't make it into
pluggable_functions.php. It's not used anywhere now, but the admin UI
will require functionality very much like it.
Unless someone objects, commit and I'll continue with UI, which I've got
to maybe 20% right now.
My user editor allows you to choose a single role from a dropdown. You
may not assign extra capabilities to users via the core user manager.
The user display system lists all roles assigned to a user (even though
the UI only lets you assign one). I'll add a table row to display
user-assigned capabilities if they exist, too.
I'm thinking to add a sub-menu on Users to assign capabilities to roles.
Also, I think it might be a good idea to add a get_assignable_caps()
to capabilities.php that returns an array of (duh) assignable
capabilities. This will be populated initially with all caps in the
core. There will be also a filter in there for plugins to add/remove caps.
The user list will be sorted alphabetically by role then by username to
emulate the current Author/Registered User behavior. The "Promote" link
and the level number with +/- will be replaced with a dropdown.
Submitting the page updates changes.
My current implementation of the User Editor page doesn't die() on
errors and force the user to use the browser's Back button. Instead, it
redisplays the form with the submitted data, and displays an error
message at the top in a .error CSS class similar to the .update class.
How do you feel about that?
All level-based checks will be removed.
Thoughts on UI from concerned quarters speak up now. I'll post a patch
of what I have for UI late this afternoon.
More information about the wp-hackers