#3833
[email protected]
Participant

Vladimir,

I finally got to setting this up. I’ve applied the filter to return true using the code for user with role ‘ga_site_administrator’. I tried to debug, and added some debug statements in classes/grant-roles.php

FILTER TO ALLOW GRANT ROLES FOR EDIT_USERS


add_filter('ure_bulk_grant_roles', 'ga_show_ure_bulk_grant_roles');
function ga_show_ure_bulk_grant_roles($show) {
    
    if(current_user_can_for_blog(null, 'ga_site_administrator') && !ga_is_super_admin())
    {
       $show = TRUE;
       echo " Show GRANT ROLES ";
    }
    

    return $show;
}

GRANT ROLES CODE:


 public function show_grant_roles_html() {
        if (!$this->lib->is_right_admin_path('users.php')) {
            return;
        }
        if (!current_user_can('edit_users')) {
            echo " IN show_grant_roles_html ".current_user_can('edit_users');
            if(current_user_can('ga_site_administrator'))
                        echo " use has ga_site_administrator";  
            print_r(get_role('ga_site_administrator' )->capabilities);   

            return;
        }
?>        

Grant Roles - edit_users capability still doesn't show up