• Resolved Luca

    (@screenload)


    The title says it all, what capability is needed for the admin-bar and backend?

    Ticked all boxes and nothing worked!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Caseproof

    (@caseproof)

    Hi there,

    Members doesn’t block the admin bar, so if you don’t see it, probably one of your plugins or theme is blocking it.
    Regarding access to WordPress dashboard, you need to grant access to “Read” capability in Posts and Pages tab of Members → Roles section.

    Best

    Thread Starter Luca

    (@screenload)

    No no no no, it’s not beeing blocked, I just need to know what capability is needed to show it for the user.

    I have user that has access to a backend module, but can’t access the backend because the capability for the backend is not set and I don’t know which one it is ??

    Plugin Author Caseproof

    (@caseproof)

    If you just want to give users access to WordPress dashboard, you need at least to set Read capabilities in Posts and Pages sections. However, when you want to give them access to a particular plugin, we don’t have a section for each plugin. Plugin authors can use any capability they want, including custom capabilities to access pages and services. If you know which capabilities are required to edit your plugins section, you can assign those capabilities to a user/role.

    Keep in mind that many plugins create admin settings pages using a native capability associated with administrators, such as manage_options so in that case, you need to contact the plugin author.

    When it comes to admin bar on front-end, you can use this code snippet to enable it:

    add_action('init', function() {
      if(current_user_can('custom_role')) {
        show_admin_bar(true);
      }
    });

    Best

    Thread Starter Luca

    (@screenload)

    That did the trick, thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Capability needed for Admin-Bar and Backend’ is closed to new replies.