Forum Replies Created
-
AuthorPosts
-
VladimirKeymaster
Hi,
My test showed that the list of groups (post types) at the “Add menu items” section does not depend from the ability of user to edit those items. My test user does not have capabilities to edit Woocommerce products but he see “Products” group at the mentioned section.
I may just suppose that another plugin may be involved. Did you try to deactivate all plugins and re-test? If that will change a picture, activating plugins back one by one you can isolate a reason.
VladimirKeymasterHi Jay,
Thanks for the additional information. I made a quick test and was redirected as expected.
So I can not repeat the issue with 2 plugins only URE Pro and WooCommerce and 2020 theme.Is it possible to get admin access to the test/stage copy where I can reproduce this? If Yes, send credentials to support [at-sign] role-editor.com
VladimirKeymasterYes, I missed a closing bracket at the line 8. Valid code is:
add_filter( 'woocommerce_disable_admin_bar', '_wc_disable_admin_bar', 10, 1 ); function _wc_disable_admin_bar( $disable ) { $user = wp_get_current_user(); if ( !is_a( $user, 'WP_User') || !is_array( $user->roles ) ) { return $disable; } if ( !in_array( 'membership_manager', $user->roles ) ) { return $disable; } return false; }
If filter does not help I suppose that another plugin may have own setting for showing admin bar at the front-end.
Try to add ‘manage_woocommerce’ to membership_manager role to exclude WooCommerce. Will it help? If it did not help, try to deactivate all plugins and re-test activating them back one by one, to isolate a source of the problem.
VladimirKeymasterHi,
Show screenshot with example of Content View Restrictions settings for product page, which does not work.
VladimirKeymasterCode for membership_manager role only will be looked this way:
add_filter( 'woocommerce_disable_admin_bar', '_wc_disable_admin_bar', 10, 1 ); function _wc_disable_admin_bar( $disable ) { $user = wp_get_current_user(); if ( !is_a( $user, 'WP_User') || !is_array( $user->roles ) ) { return $disable; } if ( !in_array( 'membership_manager', $user->roles ) ) { return $disable; } return false; }
VladimirKeymasterRead this article. Look if it’s related to your task and code below may help you:
add_filter('woocommerce_disable_admin_bar', '_wc_disable_admin_bar', 10, 1); function _wc_disable_admin_bar($prevent_admin_access) { return false; }
VladimirKeymasterIf you have other plugins which use ‘manage_options’ you may block admin menu items created by those plugins using Admin menu blocking add-on.
VladimirKeymasterI hope disabling all the options to limit my VAs is secure for the website
Login under restricted user and try input to the browser a link so any blocked admin menu item. You will see that user can not access it. URE will redirect user to the 1st available admin menu item.
I recommend though, revoke from a role all unneeded capabilities 1st and use admin menu blocking add-on only after that step.
VladimirKeymasterThanks for the good feedback.
Look at the edit restrictions add-on.
You can set “Own data only” option for this user.
In general, user with active edit restrictions will see only posts/pages which he can edit.VladimirKeymasterYou license key is active. Try to take it from your account page and input again to URE’s settings page.
I did not find any compatibility issues with PHP 7.3. Both versions of URE should be compatible.
VladimirKeymasterActivate this add-on and open “Admin menu” at URE for ‘administrator’ role. Look what capability protects menu of that plugin. Grant that capability to a role, which will work with that specific plugin.
VladimirKeymasterIs ‘upload_files’ capability granted to a role?
VladimirKeymasterI got this error: http://www.cob.org’s server IP address could not be found.
I will try again later.
VladimirKeymasterI need to look at your setup. If that’s possible, send URL and admin credentials to support [at-sign] role-editor.com
VladimirKeymasterThank you for suggestions.
Unfortunately, we did not make yet any step forward in this direction. We even exchanged with WPMF developer by couple of messages, but without visible result :).
If you can again share with me the latest version of WPMF (via DropBox or Google Drive), I will look if WPMF includes any hooks to filter Media Library items it shows. I don’t promise a quick progress though.
-
AuthorPosts