• Hello,

    I have a WordPress user with the “contributor” role but need them to be able to edit a custom block “post offer listing” from my theme Rehub.

    Currently, when the user tries to edit the block, there’s a notice “sorry, you are not allowed to do that” – see screenshot: https://www.screencast.com/t/3alVVORaJ

    If the user role is instead changed to the native “editor” role, this is not an issue.

    However, I installed the UER plugin and tried creating a new role as a copy of the “editor” role with the exact same capabilities. I thought maybe I could use a custom editor role and then simply disable some capabilities (instead of using custom contributor role and adding capabilities). Now the issue persists for some reason.

    Does this sound like there’s an issue with the editor capabilities not being copied over to the new role?

    Hoping this can be resolved, otherwise, it seems my best course of action is to stick with the native editor role for now.

    I reached out to my theme dev about this as well and they responded with this:

    REST API in wordpress for changing queries require next

    current_user_can( ‘editor’ ) || current_user_can( ‘administrator’ );

    Not sure what that means or if that’s helpful.

    Thanks!

    • This topic was modified 2 years, 4 months ago by Jesse B.
Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi,

    Code your showed intends to check directly if user has ‘editor’ or ‘administrator’ role, but not user capability granted to a related role, ‘edit_others_posts’ for example, for ‘editor’ role. So you can not work with it while you don’t have ‘editor’ role or replace ‘editor’ at the theme’s PHP code shown with selected user capability instead.

Viewing 1 replies (of 1 total)
  • The topic ‘Copy of editor role not working properly’ is closed to new replies.