[wp-trac] [WordPress Trac] #14998: Allow WP_User->has_cap() to accept TRUE or FALSE as capability

WordPress Trac wp-trac at lists.automattic.com
Fri Oct 1 13:02:58 UTC 2010


#14998: Allow WP_User->has_cap() to accept TRUE or FALSE as capability
-----------------------------+----------------------------------------------
 Reporter:  coffee2code      |       Owner:                 
     Type:  enhancement      |      Status:  new            
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Role/Capability  |     Version:  3.0.1          
 Severity:  minor            |    Keywords:  has-patch      
-----------------------------+----------------------------------------------

Comment(by hakre):

 I think that introduces bugs as it can differ on runtime. You seem to have
 a faible to overload function arguments, but I don't think that this is
 helpful generally.

 Probably the information stored with the menu elements which capabilities
 are needed will be executed for other users as well which would return
 true for them even if they don't have the needed capability. That could be
 somehow dangerous and hard to debug.

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


More information about the wp-trac mailing list