Forum Replies Created

Viewing 15 posts - 1,501 through 1,515 (of 2,522 total)
  • Author
    Posts
  • in reply to: Can't revoke access custom post types #3915
    Vladimir
    Keymaster

    Hi Benny,

    WPML: wpml_% capabilities were lost somehow. I added 3 of them. ‘WPML’ menu is available for admin now.

    1st results for ‘My Testimonials’ access. You changed this plugin custom post type to ‘testimonial’ in its Settings.
    Plugin commercegurus-toolkit registers ‘testimonials’ custom post type which conflicts with ‘My Testimonials’ after you turn ON ‘force custom post type to use own capabilities’ in URE.
    So,
    1) If you deactivate ‘commercegurus-toolkit’ plugin you will get back full access to ‘My Testimonials’.
    2) If you turn OFF related option at URE Settings you will get back full access to ‘My Testimonials’ without deactivating ‘commercegurus-toolkit’ plugin.
    For the 1st glance, some mess with custom post types registration takes place here. CPT registered by ‘commercegurus-toolkit’ (Projects, Showcases, Testimonials, Top Reviews, Announcements) are not available in WP admin menu until you switch to other theme, like WP default 2017 one.

    Vladimir
    Keymaster

    A list of roles which are assigned to a user at subsite is not updated. But roles specific to a subsite are removed from subsite after the network update saves to subsites the roles from the main site. Older roles are still assigned to a user after the such update, but they are counted and shown as the custom capabilities assigned directly to a user, not as roles, because of these roles do not exist.

    “Apply to all sites” has always been at the root site level. It’s a feature from free version of URE. I do not show this interface element at network UI to not mislead the users having at one page 2 interface elements which are both related to the network role(s) update, but work so differently. May an option ‘Replicate a current role only’ at the opened dialog window will be more suitable in this case. What do you think?

    Select the best strategy of roles update according to your own needs. Just take into account, that data are replicated differently in those cases. If you need to have different roles at subsites comparing to the main site you should not use “Update Network”. So ‘Yes’ it’s better to replicate single role from the main site.

    Vladimir
    Keymaster

    Hi,
    In order to force bbPress to use ‘delete_replies’ and ‘delete_topics’ capabilities for content authours add this code to your active theme functions.php file or setup it as a “must use” plugin:

    
    add_filter('bbp_map_reply_meta_caps', 'bbp_delete_own_replies', 10, 4);
    
    function bbp_delete_own_replies($caps, $cap, $user_id, $args) {
        if ($cap!=='delete_reply' || in_array('do_not_allow', $caps)) {  
            return $caps;        
        }
        
        $_post = get_post( $args[0] );
        if (empty($_post)) {
            return $caps;
        }
        
        if ($_post->post_author==$user_id) {
            $caps = array('delete_replies');
        }
        
        return $caps;    
    }
    
    add_filter('bbp_map_topic_meta_caps', 'bbp_delete_own_topics', 10, 4);
    
    function bbp_delete_own_topics($caps, $cap, $user_id, $args) {
    
        if ($cap=='delete_topic' || in_array('do_not_allow', $caps)) {
            return $caps;
        }
        
        $_post = get_post( $args[0] );
        if (empty($_post)) {
            return $caps;
        }
        
        if ($_post->post_author==$user_id) {
            $caps = array('delete_topics');
        }
        
        return $caps;
    }
    
    Vladimir
    Keymaster

    Hi Shweta,

    There are no network level roles at WordPress. Be aware that when you work with roles at the “Network Admin->Users->User Role Editor”, you work with roles of the main site of a network really. “Network Update” from there overwrites roles of any other subsite of this network with roles from a main site of that network. So any changes made to the roles at subsite are lost after you click ‘Network Update’. All subsites get an exact copy of capabilities and roles from the main site.

    It’s possible to send to subsites just one role from a main site and do not touch any others. Go to the main site “Users->User Role Editor”, select role, turn ON “Apply to All sites” option at the top of a page and click “Update” button. Only current role will be replicated to subsites in this case.

    Vladimir
    Keymaster

    Hi,

    These elements are named meta boxes at a WordPress. Yes, it’s possible to hide them for a role using ‘Meta boxes access‘ add-on.

    in reply to: Can't revoke access custom post types #3906
    Vladimir
    Keymaster

    I got ‘My Testimonial’ plugin. Thanks. I don’t see any problem with access to it at my test installation. It’s a capabilities set for WP built-in ‘post’ by default or capabilities set for ‘imtst_testimonials’ custom post type in case you turned ON URE Pro’s option ‘force custom post types to use own capabilities’.

    I tried to look on the current settings at your site, but a user you provided to me does not have admin privileges currently.

    I will can to say more on WPML too if/when you refresh my access to your site.

    Vladimir
    Keymaster

    Hi,

    Can ‘GA Site Administrator’ role edit this page? URE does not apply content view restrictions to a page in case current user can edit this page. This is a default behavior.

    In case you need to change this, you can set a custom hook ‘ure_restrict_content_view_for_authors_and_editors‘.

    in reply to: Woocommerce #3904
    Vladimir
    Keymaster

    Hi,

    Send me a screenshot of ‘content view restrictions’ section of a store page. I will try to reproduce an issue and check what is going wrong there.

    Vladimir
    Keymaster

    Hi,

    I will try to help you as I return to office, at June, 29th.

    Vladimir
    Keymaster

    It’s possible to modify a default bbPress access model using its custom filters:
    ‘bbp_map_reply_meta_caps’, ‘bbp_map_topic_meta_caps’.

    Vladimir
    Keymaster

    Hi,

    bbPress uses a different model of work with topics and replies privileges comparing to the WordPress posts. While bbPress adds ‘delete_topics’, ‘delete_replies’ it really uses just ‘delete_others_topics’ (includes/topics/capabilities.php, line #180) and ‘delete_others_replies’ (includes/replies/capabilities.php, line #162). So default bbPress permissions model does not allow to a user to delete his own content. User should have a ‘moderate’ or ‘delete_others_%’ capability to get access to delete operation. But with this access user can delete a content from any user/author.

    in reply to: Can't revoke access custom post types #3891
    Vladimir
    Keymaster

    Hi Benny,

    You helped me to find a bug in admin menu access add-on. Thanks. I will develop a fix next week as I return home from a short trip. It will take some time for testing before I can to publish the update.

    A quick workaround is to add ‘edit_portfolios’ capability to the role and block all ‘Portrolio’ menu items via the same admin menu access add-on. I did this at your site and user with ‘Klant’ role does not have access to the ‘Portfolio’ menu.

    in reply to: Can't revoke access custom post types #3888
    Vladimir
    Keymaster

    I reproduced the issue with ‘Portfolio post type’ plugin. I will investigate it and inform you about a result.

    in reply to: Can't revoke access custom post types #3887
    Vladimir
    Keymaster

    Hi Benny,

    Can you share for me ‘My Testimonials’ plugin copy via dropbox or similar service. I will look on its permissions at my local development environment.

    Vladimir
    Keymaster

    You are right, I updated my previous answer: at “Additonal Modules” tab.

    Correct: while plugin is network activated you have one global for the whole network default access error message.

    If you network deactivate plugin and activate it individually for selected subsites, you can have individual for every subsite settings.

    Other option – input custom shortcode as a network global access error message template. Then built a message individual for subsite inside a PHP processing that shortcode.

Viewing 15 posts - 1,501 through 1,515 (of 2,522 total)