[wp-trac] [WordPress Trac] #50260: Multisite - Getting actual user capabilities with get_role_caps() different with current_user_can()

WordPress Trac noreply at wordpress.org
Wed May 27 08:59:27 UTC 2020


#50260: Multisite - Getting actual user capabilities with get_role_caps() different
with current_user_can()
-----------------------------+------------------------------
 Reporter:  Mahesh901122     |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Role/Capability  |     Version:  5.4.1
 Severity:  normal           |  Resolution:
 Keywords:  dev-feedback     |     Focuses:
-----------------------------+------------------------------

Comment (by Mahesh901122):

 I'm getting below capabilities as `false` with **current_user_can()**:

 {{{
 edit_themes
 activate_plugins
 edit_plugins
 edit_users
 edit_files
 manage_links
 unfiltered_html
 delete_users
 create_users
 unfiltered_upload
 update_plugins
 delete_plugins
 install_plugins
 update_themes
 install_themes
 update_core
 delete_themes
 }}}

 and `true` for below:

 {{{
 switch_themes
 manage_options
 moderate_comments
 manage_categories
 upload_files
 import
 edit_posts
 edit_others_posts
 edit_published_posts
 publish_posts
 edit_pages
 read
 level_10
 level_9
 level_8
 level_7
 level_6
 level_5
 level_4
 level_3
 level_2
 level_1
 level_0
 edit_others_pages
 edit_published_pages
 publish_pages
 delete_pages
 delete_others_pages
 delete_published_pages
 delete_posts
 delete_others_posts
 delete_published_posts
 delete_private_posts
 edit_private_posts
 read_private_posts
 delete_private_pages
 edit_private_pages
 read_private_pages
 edit_dashboard
 list_users
 remove_users
 promote_users
 edit_theme_options
 export
 restrict_content
 list_roles
 administrator
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50260#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list