WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Custom capabilities get deleted

[Resolved] Custom capabilities get deleted

  • podpirate
    Participant

    @podpirate

    Hi Vladimir,
    I just had an issue with my plugin WP Access Areas (see aside*), where all capabilities added to a user get lost, after assigning a role through URE: https://github.com/mcguffin/wp-access-areas/issues/14

    I sneaked a little bit in your code and I noticed that the plugin does not keep what it finds in the users capabilites array, but deletes everything and reassigns what it finds in $_POST.

    I don’t know if you plan to change this behavior in a future release, but it would make me very glad (and maybe some users as well), when both plugins could be talked into cooperating with each other.
    Please let me know, what you think.

    best regards,
    joern

    (*Aside: WP Access Areas defines custom-named capabilities, assigns them to posts and users (via $user->add_cap()) and determines mainly through current_user_can() if someone is permitted to view, edit or comment a post.)

    http://wordpress.org/plugins/user-role-editor/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Vladimir Garagulya
    Participant

    @shinephp

    Hi,

    I’m on vacations now, until September 18th. I will definitely research the issue by my return and update code to provide the compatibility with “WP Access Areas”.

    Regards,
    Vladimir.

    Plugin Author Vladimir Garagulya
    Participant

    @shinephp

    Hi,

    Please test version 4.5.2 from your side. It should support capabilities added by “WP Access Areas”. Problem was that WPAA adds capabilities directly to the users ignoring administrator role, while I supposed that ALL capabilities should be included into administrator role, as WP does by default. URE takes into account such capabilities beyond roles now.

    Regards,
    Vladimir.

    podpirate
    Participant

    @podpirate

    Hi Vladimir,
    I just tested it. It works fine. Thanks a lot!
    (WPAA is mainly intended to manage access on a per-user level. That’s why I didn’t bother with roles at all, rather than leaving that job to existing plugins like URE.)
    Thank you again!
    joern

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Custom capabilities get deleted’ is closed to new replies.