Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter chris7148

    (@chris7148)

    No problem. I was using the latest version, but you were right about the JS cache – clearing that resulted in denied capabilities no longer wrongly selected.

    Since the interface represents two states, any existing specifically denied capabilities are lost when it is used to save a role.

    It would be great if the interface could allow management of them too, but I appreciate that could take some effort to implement, especially when you have so many active users who won’t see this as a problem ??

    Thread Starter chris7148

    (@chris7148)

    Thanks for the quick reply, Vladimir.

    I appreciate the difference between granted and not granted is represented, but a third state of ‘explicitly denied’ does not appear.

    For example if you do this:

    $result = add_role(
        'basic_contributor',
        __( 'Basic Contributor' ),
        array(
            'read'         => true,  // true allows this capability
            'edit_posts'   => true,
            'delete_posts' => false, // Use false to explicitly deny
        )
    );

    The capability ‘delete_posts’ is ‘explicitly denied’. I only found this by accident, after setting a value of an unwanted capability rather than leaving it out of the array. The URE interface indicates such values with a tick, hence my confusion.

Viewing 2 replies - 1 through 2 (of 2 total)