WordPress.org

Ready to get started?Download WordPress

Forums

Capability Manager Enhanced
[resolved] Saving a role after modifications does not seem to work (4 posts)

  1. cjmusante
    Member
    Posted 9 months ago #

    I've got a role which is called _Visitor. I would like to be sure that this role has the absolute minimum capabilities, and when I examine the role through [Users>Role Capabilities], I see that there are a few capabilities which are currently enabled, but which I would like to disable. If I deselect these items, and press the "Save Changes" button, I receive confirmation that the changes have been saved, but they are still shown as being enabled, once the screen is refreshed.

    However, if I perform the same basic steps with the "Author" role, I am able to edit the role, adding and deleting capabilities, with the correct results.

    The _Visitor role is a role that I created some time ago. Is there some reason why I can edit one role, and not another?

    http://wordpress.org/plugins/capability-manager-enhanced/

  2. cjmusante
    Member
    Posted 9 months ago #

    More details:
    I've done a bit more testing, and it seems that for the role of _Visitor, I'm able to add and remove capabilities in the Core Capabilities area, as well as the Additional Capabilities area. There are however a few capabilities, listed in the Additional Capabilities area which I cannot delete. These capabilities are called "Delete Wiki Page" and "Edit Wiki Page".

    Is there an explanation why I cannot remove this capability from this role?

  3. kevinB
    Member
    Plugin Author

    Posted 9 months ago #

    There are however a few capabilities, listed in the Additional Capabilities area which I cannot delete. These capabilities are called "Delete Wiki Page" and "Edit Wiki Page".

    My guess is that the plugin which defines those capabilities is forcing them back into the role definition.

  4. cjmusante
    Member
    Posted 9 months ago #

    Yes, thanks, that was indeed the case.
    The plug-in in question "WordPress Wiki" was indeed asserting the privileges, which was overriding any changes that I tried to make using Capabilities Manager.

    The code that was included in one of the PHP files for this plug-in looked like this...

    $this->permissions = array(
    /*'edit_wiki'=>true,
    'edit_wiki_page'=>true,
    'edit_wiki_pages'=>true,
    'edit_others_wiki_pages'=>true,
    'publish_wiki_pages'=>true,
    'delete_wiki_page'=>true,
    'delete_others_wiki_pages'=>false*/

    To clear up the problem, we simply commented out the code. As soon as we made this change, we were able to use Capabilities Manager Enhanced to add or delete these capabilities from any role or user.

    Thanks for your help,
    Cliff

Reply

You must log in to post.

About this Plugin

About this Topic