[wp-trac] [WordPress Trac] #14387: current_user_can returns false for roles "higher" than built-ins

WordPress Trac wp-trac at lists.automattic.com
Thu Jul 22 16:27:46 UTC 2010


#14387: current_user_can returns false for roles "higher" than built-ins
-----------------------------+----------------------------------------------
 Reporter:  sbressler        |        Owner:         
     Type:  defect (bug)     |       Status:  closed 
 Priority:  normal           |    Milestone:         
Component:  Role/Capability  |      Version:         
 Severity:  normal           |   Resolution:  invalid
 Keywords:                   |  
-----------------------------+----------------------------------------------

Comment(by nacin):

 The issue is that roles aren't hierarchical. We don't check that role Y is
 a full superset of role Y, thus current_user_can('editor') wouldn't work
 for administrators. Please don't resort to user levels. There's always a
 better way.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14387#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list