Forum Replies Created

Viewing 15 posts - 1,381 through 1,395 (of 2,518 total)
  • Author
    Posts
  • in reply to: Manage central roles in Multisite #4303
    Vladimir
    Keymaster

    Hi Maarten,

    “Update Network” replicates all roles from the main site to all subsites of the network and fully overwrites existing subsites roles. Currently it’s not possible to replicate just part of the roles and do not remove roles which does not exist at the main site.

    It’s a subject of a future development – may be next year.

    in reply to: Big problems with user rights #4300
    Vladimir
    Keymaster

    Hi,

    Thanks for letting me know that the issue was resolved.

    Did you turn ON ‘Activate “Create” capability for posts/pages/custom post types’ option at URE Settings? Yes, in this case we have to grant ‘create_posts’, ‘create_pages’ capability to the roles, including ‘editor’ manually.

    in reply to: Permissions Issue #4297
    Vladimir
    Keymaster

    Is there a chance to look at this issue on-line with admin privileges?
    If Yes, send login credentials directly to support [at-sign] role-editor.com

    in reply to: Big problems with user rights #4295
    Vladimir
    Keymaster

    Hi,

    Yes, URE is compatible with WPML. There is no need to grant to a user any WPML user capability until user don’t need access to some WPML menu item or page.

    WPML has own permissions module. User should be included into translators list for the specific language at WPML, before he will see an ‘edit’ link for that language.
    You can deactivate URE Pro and re-check. I mean that it could be WPML related issue, not User Role Editor Pro.

    in reply to: Edit selected posts #4294
    Vladimir
    Keymaster

    This article is still up to date. Look at it as documentation page. Yes, it was written some months ago, but it describes a working feature, may be except of some minor changes.

    Can this user edit posts or pages? “Posts/Pages/Custom Post Types Editor Restrictions” section is shown is a user profile page only for users who can edit posts or pages. Settings from this section does not bring to a user any new permissions. All it is about to restrict the existing editing access, narrow down it.

    You will not see this section at user profile, if a user has ‘administrator’ role. There is no sense to restrict site super administrator.

    in reply to: Protecting specific page from being edited #4288
    Vladimir
    Keymaster

    I followed this article always.
    And selected “Subdirectories — a path-based network in which on-demand sites use paths” to not struggle configuring Apache with subdomains.

    in reply to: Protecting specific page from being edited #4285
    Vladimir
    Keymaster

    Look how it works at my test site – demo video.

    Slightly enhanced code version. Update your copy:

    
    add_filter('ure_edit_posts_access_id_list', 'ure_edit_posts_access_set_id_list');
    
    function ure_edit_posts_access_set_id_list($list) {
        if (!current_user_can('edit_others_pages')) {
            return $list;
        }
        
        $slugs = array('shop', 'busket');   // input blocked pages slug here
        $id_list = array();
        foreach($slugs as $slug) {
            $page = get_page_by_path($slug);
            if (!empty($page)) {
                $id_list[] = $page->ID;
            }
        }
        if (count($id_list)>0) {
            $id_list_str = implode(',', $id_list);
            $list .= $id_list_str;
        }
    
        return $list;
    }
    
    add_filter('ure_edit_posts_access_restriction_type', 'ure_edit_posts_access_set_restriction_type');
    
    function ure_edit_posts_access_set_restriction_type($restriction_type) {
        if (current_user_can('edit_others_pages')) {
            $restriction_type = 2; // Block
        }
        
        return $restriction_type;
    }
    
    in reply to: 2nd personal license needed #4283
    Vladimir
    Keymaster

    Hi Chris,

    Yes, you have to create a 2nd account: open purchase page without login to the site and use another user name and email address.

    in reply to: Protecting specific page from being edited #4281
    Vladimir
    Keymaster

    This code does not depend from a page ID. It blocks edit access for pages with ‘shop’ and ‘busket’ slugs for any user with ‘edit_others_pages’ capability for any subsite.

    
    add_filter('ure_edit_posts_access_id_list', 'ure_edit_posts_access_set_id_list');
    
    function ure_edit_posts_access_set_id_list($list) {
        $current_user = wp_get_current_user();
        $lib = URE_Lib_Pro::get_instance(); 
        if (!current_user_can('edit_others_pages')) {
            return $list;
        }
        
        $slugs = array('shop', 'busket');
        $id_list = array();
        foreach($slugs as $slug) {
            $page = get_page_by_path($slug);
            if (!empty($page)) {
                $id_list[] = $page->ID;
            }
        }
        $id_list_str = implode(',', $id_list);
        $list .= $id_list_str;
    
        return $list;
    }
    
    add_filter('ure_edit_posts_access_restriction_type', 'ure_edit_posts_access_set_restriction_type');
    
    function ure_edit_posts_access_set_restriction_type($restriction_type) {
        $current_user = wp_get_current_user();
        $lib = URE_Lib_Pro::get_instance(); 
        if (current_user_can('edit_others_pages')) {
            $restriction_type = 2; // Block
        }
        
        return $restriction_type;
    }
    

    If you will wish to add some edit restriction for user with ‘edit_others_pages’ manually, you should take into account that this restricton should be the same type “Block” in order to not break this code and vice versa.

    in reply to: Protecting specific page from being edited #4279
    Vladimir
    Keymaster

    Give me more details. Does it one page for a subsite?
    Show a list of pages with ID and permalinks (without domain) and describe conditions, how will you decide what permalink for what site to select.

    in reply to: Protecting specific page from being edited #4276
    Vladimir
    Keymaster

    It possible to extend a logic of the ‘set_id_list’ function using WP function url_to_postid(), in order to return a page ID related to current site.

    in reply to: Hide/Disable Tools > Scheduled Actions #4275
    Vladimir
    Keymaster

    Try to deactivate and activate back User Role Editor Pro.

    in reply to: Hide/Disable Tools > Scheduled Actions #4274
    Vladimir
    Keymaster

    I got it. Thanks. It’s really comes from “WC Subscriptions” plugin. But I have another picture at my test. Menu items is protected by ‘edit_posts’ capability and it’s available for blocking at ‘Admin menu’:
    Scheduled Actions in admin menu for editor

    in reply to: Protecting specific page from being edited #4272
    Vladimir
    Keymaster

    This screenshot belongs to other add-on: Content view restrictions, which works for front-end.

    I recommended to use another one. If you provide that those restricted pages will have the same IDs at any subsite of your network, you can setup the list of restricted pages, like “1, 3, 7” via custom filters ‘ure_edit_posts_access_id_list’ and ‘ure_edit_posts_access_restriction_type’ as a must use plugin – which will work for any subsite.

    
    add_filter('ure_edit_posts_access_id_list', 'ure_edit_posts_access_set_id_list');
    
    function ure_edit_posts_access_set_id_list($list) {
        $current_user = wp_get_current_user();
        $lib = URE_Lib_Pro::get_instance(); 
        if ($lib->user_can_role($current_user, 'editor')) {
            $list .= ',1,3,7';
        }
    
        return $list;
    }
    
    add_filter('ure_edit_posts_access_restriction_type', 'ure_edit_posts_access_set_restriction_type');
    
    function ure_edit_posts_access_set_restriction_type($restriction_type) {
        $current_user = wp_get_current_user();
        $lib = URE_Lib_Pro::get_instance(); 
        if ($lib->user_can_role($current_user, 'editor')) {
            $restriction_type = 2; // Block
        }
        
        return $restriction_type;
    }
    
    in reply to: Hide/Disable Tools > Scheduled Actions #4270
    Vladimir
    Keymaster

    OK. Can you share “WC Subscriptions” plugin copy with me (support [at-sign] role-editor.com) via Dropbox, Google Drive or similar?
    I will investigate this in my local test environment then.

Viewing 15 posts - 1,381 through 1,395 (of 2,518 total)