Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #4526
    cgharing
    Spectator

    Sorry probably a old question, I have been using pro version for some time but with pre-configured roles and plug in roles added by plugins ( works great).
    I decided to add new roles and restrict what they can do.
    Problem the new roles can’t access the dashboard.

    How can I fix

    Thanks
    Chris

    #4527
    cgharing
    Spectator

    Ok, fixed problem needed to add “view_admin_dashboard” to New roles.

    Thanks
    Chris

    #4528
    Vladimir
    Keymaster

    Hi Chris,

    Thanks for letting me know that you resolved a problem.

    #4529
    cgharing
    Spectator

    Hello Vladimir, love the plugin.
    I don’t know how to fix this

    this problem only happens on the new roles i created. they can login to the back end of site and have tool/admin bar, but when go to site or store the tool/admin bar goes away.
    this doesn’t happen with any pre defined roles just the new one I made.

    what did i do wrong.
    Thanks
    Chris

    #4530
    Vladimir
    Keymaster

    Hi Chris!

    It could be related to some other plugin.
    One possible source of a problem is WooCommerse: https://role-editor.com/woocommerce-admin-bar-access/
    Try to deactivate WooCommerce temporally and re-test.

    #4532
    cgharing
    Spectator

    Hello Vladimir

    Yes, you are correct, I added the rights to Create,edit and publish posts. the user now has access to the tool bar when browsing sight.

    Thank You for resolving issue.

    Chris

    #4533
    cgharing
    Spectator

    Hello Vladimir

    quick update, made solution that is pretty clean and easy to do, and you can grant tool bar access to any roll you make.

    I made a capability and called it ‘see admin toolbar’

    then added it to the 2 files you pointed out in your link.

    works great, I can make new role now and give it see admin toolbar right and you get toolbar on front page regardless of edit posts.

    Very exciting
    Thanks

    #4535
    Vladimir
    Keymaster

    Hi Chris,

    Be aware that editing plugins source files is not a good practice. All changes will be lost after the next plugin update. And you will have to make the same changes again.

    The better solution is to edit your child theme functions.php file only:

    
    add_filter('woocommerce_disable_admin_bar', '_wc_disable_admin_bar', 10, 1);
     
    function _wc_disable_admin_bar($prevent_admin_access) {
        if (!current_user_can('see_admin_toolbar')) {
            return $prevent_admin_access;
        }
        return false;
    }
    
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.