Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #31183, comment 5


Ignore:
Timestamp:
02/04/2015 02:21:09 PM (10 years ago)
Author:
prasoon2211
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31183, comment 5

    v1 v2  
    11@SergeyBiryukov: Well, I didn't know about custom roles so thanks for letting me know :)
    22
    3 Anyway, while I was investigating this issue, I thought of removing the {{{install_plugins}}} capability from an {{{administrator}}} for testing. So, I used {{{remove_cap}}} on the admin user. But, the capability didn't get removed. So, I opened up a debugger to see what was happening inside the {{{remove_cap}}} method and there seems to be a problem in it. See this debugging screenshot: [[Image(http://picpaste.com/pics/remove_cap-ubXz63Nz.1423056638.png)]]
     3Anyway, while I was investigating this issue, I thought of removing the {{{install_plugins}}} capability from an {{{administrator}}} for testing. So, I used {{{remove_cap}}} on the admin user (not a role but a {{{WP_User}}}). But, the capability didn't get removed. So, I opened up a debugger to see what was happening inside the {{{remove_cap}}} method and there seems to be a problem in it. See this debugging screenshot: http://picpaste.com/pics/remove_cap-ubXz63Nz.1423056638.png
    44
    55On the left pane is the {{{remove_cap}}} function which checks for the {{{capability}}} to remove under the {{{$this->caps}}} variable when it should (I think) check in {{{$this->allcaps}}} (see local vars in the right pane).