[wp-hackers] User Capabilities

Owen Winkler ringmaster at midnightcircus.com
Mon Jul 11 01:20:33 GMT 2005


Ryan Boren wrote:

>Actually, after some bugfixing done in 1.5.1, that setting determines
>whether new users are given level 0 or 1.  So, we'll just give them
>"Registered" or "Contributor" roles instead (assuming we do the
>"Contributor" role).  Backward compatibility would be assisted by a
>"Contributor" role that maps to level 1.
>  
>
Right, as long as we're talking about a dropdown that lists *all* roles, 
for two reasons: 
1) I could set mine to 'Author', which is what I currently do for 
Free-For-All-Friday.
2) Custom roles would be supported, so I could set self-registered users 
on FFAF to a special role that I define, and then grant publish_post 
rights only on that Friday. 

This would be a royal pain to implement under the bugfixes you've 
described, therefore it's a good improvement in 1.6, and also explains 
why thing haven't been working as I've expected every so often when a 
new user registers in my current 1.5 install.  ;)

Ugh... I've just taken a cursory look at updating the UI for roles.  
There is a lot of stuff that depends on user_level.  For example, users 
of level 5 can edit users of level 4 or less.  In my opinion, this 
should not be; You should be able to edit any user if you have the 
'edit_users' cap.  Thoughts on this?  Can we ditch the user_level 
dependencies in the core altogether?

Owen




More information about the wp-hackers mailing list