Forum Replies Created

Viewing 15 posts - 586 through 600 (of 2,529 total)
  • Author
    Posts
  • in reply to: Show Menu per role #6784
    Vladimir
    Keymaster

    Hi,

    It’s a known bug. You can try the beta version 4.56.b1, which includes the fix. You may take it from the “Download” page.

    in reply to: Restrict Access to Some Admin Dashboard Widgets #6783
    Vladimir
    Keymaster

    Dashboard widgets are realized as meta boxes really. Try meta boxes access add-on to hide it for selected role.

    in reply to: Show only applicable capabilities when filtering #6779
    Vladimir
    Keymaster

    Thank you for the valuable suggestion. I applied it. It will be available with the next update.

    Vladimir
    Keymaster

    Hi,

    You can not make this via URE Pro user interface. Try this custom code. It hides all medial library items uploaded by user with ID=1 from users with roles event-admin or event-superadmin:

    
    add_action('pre_get_posts', 'hide_attachments_for_role', 99);
    
    function hide_attachments_for_role( $query ) {
    
        global $pagenow, $wpdb;
            
        if ( $pagenow !== 'upload.php' ) {
            return;
        }
    
        if ($query->query['post_type']!=='attachment') {
            return;
        }
        
        $user = wp_get_current_user();
        if ( $user->ID==1 ) {   
            return; // do not restrict super admin
        }
        
        if ( ! (in_array( 'event-admin', $user->roles ) || !in_array( 'event-superadmin', $user->roles ) ) ) {
            // do not hide media items uploaded by admin from roles others than above
            return;
        }
        
        $sub_query = "SELECT ID FROM {$wpdb->posts} 
                        WHERE post_type='attachment' AND post_author=1";
        $admin_list = $wpdb->get_col($sub_query);
        
        if ( empty( $query->query['post__in'] ) ) {
            if ( empty( $query->query['post__not_in'] ) ) {
                $query->set( 'post__not_in', $admin_list );
            } else {
                $list1 = array_merge( $query['post__not_in'], $admin_list );
                $query->set( 'post__not_in', $list1 );
            }
        } else {
            $list1 = array();
            foreach ( $query->query['post__in'] as $id ) {
                if ( !in_array($id, $admin_list)) {
                    $list1[] = $id; // leave just allowed items
                }
            }
            if (empty( $list1 ) ) {
                $list1[] = -1;
            }
            $query->set( 'post__in', $list1 );
        }
    }
    // end of hide_attachments_for_role()
    
    in reply to: Give user access to Updraft Plus Backup Plugin #6775
    Vladimir
    Keymaster

    Hi,

    “Settings->UpdraftPlus Backups” menu item is protected by ‘manage_options’ capability.
    You may grant ‘manage_options’ capability to a role and block other items of the Settings menu via Admin menu access add-on.

    Vladimir
    Keymaster

    I will add it to the upcoming version 4.56, end of April or begin of May, approximately.

    Vladimir
    Keymaster

    Hi,

    It does not depend from the presence of User Role Editor Pro. WordPress itself decide where to show UI to change default role for a new user.

    For WordPress multisite:
    Go to “Network ADmin -> My Sites” –> “Network Admin” –> “Sites” –> “All Sites” and select “Edit” on the site that you want to set the default role for, then click “Settings”. Scroll down and you should see “Default Role”. Set the role to ‘subscriber’(whatever you want) and save.

    in reply to: >> Multisite Network administrator #6763
    Vladimir
    Keymaster

    These articles explain how WordPress stores user roles:
    Single site
    Multisite

    Grant all existing capabilities to ‘administrator’ role after you will restore it.

    in reply to: Make copy of role doesn’t copy everything #6762
    Vladimir
    Keymaster

    Yes, it’s by design. When you select role at the “Make copy of” field of the “Add role” dialog URE processes only the list of user capabilities of the selected role, nothing else.

    Vladimir
    Keymaster

    Current version does not allow to realize this.

    I will add to the next update the additional parameter “Blocking Model”, e.g.
    Block: () Selected () Not Selected.
    When “Not selected” choice will be made, URE will block all widgets/sidebars, which checkboxes are not turned ON, including any new items.

    Vladimir
    Keymaster

    @ElizabethM: Thanks for your help.

    Learndash (LD) plugin source code checking showed that LD uses 10 additional capabilities to manage access for quizies:
    wpProQuiz_show
    wpProQuiz_add_quiz
    wpProQuiz_edit_quiz
    wpProQuiz_delete_quiz
    wpProQuiz_show_statistics
    wpProQuiz_reset_statistics
    wpProQuiz_import
    wpProQuiz_export
    wpProQuiz_change_settings
    wpProQuiz_toplist_edit

    You can find them under the ‘Custom capabilities’ group. LD grants these capabilities automatically to the ‘administrator’ role only. Did you try to grant them to your custom role in order to resolve the permissions problem?

    Of course role should can all capabilities required by at least the LD courses custom post type:
    delete_courses
    delete_others_courses
    delete_private_courses
    delete_published_courses
    edit_courses
    edit_others_courses
    edit_private_courses
    edit_published_courses
    publish_courses
    read_private_courses

    Let me know if you need the additional help.

    Vladimir
    Keymaster

    Can you share with me the latest version of Learndash? If Yes, share it with support [at-sign] role-editor.com via Google Drive or DropBox.

    in reply to: Feature request to support WP Media Folder Plugin #6754
    Vladimir
    Keymaster

    Thanks.
    I downloaded plugin copy successfully and remove the link about to hide it from public.
    I will let you know when I will have a progress with the subject.

    Vladimir
    Keymaster

    Take into account how URE works with meta boxes. Meta box exists only at the page for which it was created. Post meta boxes exists only at the post editor page, etc. So URE remembers active meta boxes when user opens pages. So to see meta boxes list at the URE “Meta boxes” dialog you have to “show” those meta boxes to URE.

    When user deactivates plugin, which have created meta boxes, those meta boxes are still shown at the URE’s list. That’s why a ‘X’ icon to the right of every meta box row is presented – to remove from URE’s list a meta box, which does not exist at WordPress anymore. It works globally for all roles at once.

    1) URE does not restrict administrator role in any manner. All URE add-ons follows this rule – administrator as superuser can do and see all.
    If you need power user with less permissions than superuser, create a copy of administrator role and restrict it.

    2) If you suddenly delete some meta box from URE list, it’s easy to return it back – just open the page where this meta box is shown. URE will remember this meta box again.

    3) Possible has sense. But user will have to “teach” URE again after that – open pages with meta boxes, in order URE can catch and remember them.

    in reply to: Invert View Filter #6748
    Vladimir
    Keymaster

    Hi Mike,

    It’s not possible with UI at wp-admin. You may use any SQL tool, like phpMyAdmin or MySQL WorkBench, and execute this command:

    
    SELECT DISTINCT wp_users.ID, wp_users.user_login, wp_usermeta.meta_value 
    	FROM wp_usermeta 
    		JOIN wp_users on wp_users.ID=wp_usermeta.user_id
    	WHERE wp_usermeta.meta_key='wp_capabilities' AND
    		wp_usermeta.meta_value NOT LIKE '%subscriber%'
    	ORDER BY wp_users.ID;
    

    Just replace ‘wp_’ at the database tables names with your DB prefix from wp-config.php.
    Make the same replacement for the meta_key ‘wp_capabilities’ value.
    Command above will show the list of all users without subscriber role.

Viewing 15 posts - 586 through 600 (of 2,529 total)