Forum Replies Created
-
AuthorPosts
-
VladimirKeymaster
Yes, it’s exactly that what I asks to show. Thanks.
I still can not reproduce the issue though.
Could you check and show me the link from your site for the ‘Log Out’ menu item at top right corner. I suppose the only case when it could be removed by URE Pro – when it was modified somehow from the default value: wp-login.php?action=logout&_wpnonce=…VladimirKeymasterHi,
All these WooCommerce Settings page tabs a linked to the URL like
admin.php?page=wc-settings&tab=
I do not see page=woocommerce anywhere. WordPress can not find such resource registered and shows the error message ‘can not load …’.Try to find why you have the wrong links at these tabs.
VladimirKeymasterHi,
Try to install this code as a “must use” plugin. Replace ‘subscriber’ role inside to you own role ID, e.g. ‘candidate’:
add_filter('woocommerce_account_menu_items', 'filter_wc_my_account_menu'); add_action('template_redirect', 'redirect_for_blocked_wc_pages'); function filter_wc_my_account_menu($items) { if (!current_user_can('subscriber')) { return $items; } if (isset($items['dashboard'])) { unset($items['dashboard']); } if (isset($items['orders'])) { unset($items['orders']); } if (isset($items['downloads'])) { unset($items['downloads']); } if (isset($items['edit-address'])) { unset($items['edit-address']); } if (isset($items['payment-methods'])) { unset($items['payment-methods']); } return $items; } function check_end_point_url($end_point, $current_url) { $blocked_url = wc_get_endpoint_url($end_point); if ($current_url==$blocked_url) { $my_account_url = wc_get_endpoint_url('woo-account-page'); wp_redirect($my_account_url); die; } } function redirect_for_blocked_wc_pages() { global $wp; if (!current_user_can('subscriber')) { return; } $current_url = trailingslashit(home_url($wp->request)); $blocked_end_points = array('dashboard', 'orders', 'downloads', 'edit-address', 'payment-methods'); foreach($blocked_end_points as $bep) { check_end_point_url($bep, $current_url); } }
VladimirKeymasterNot yet, I just see that a reason of this problem in URE “admin menu access” module. I need to reproduce this problem to start searching a solution.
Show a screenshot of “Admin menu access” dialog window for the problematic role. I will try to make the same settings.VladimirKeymasterThat’s strange. Please test if ‘Logout’ link will be available if you deactivate (temporary) “Admin menu access” add-on. Will it be shown?
VladimirKeymasterMedia Library items are protected by the same capabilities as the posts and should be available for view without any limits. The list Media items is restricted if you set the edit restrictions for the role or the user. Is it your case?
It’s not possible currently to restrict role to edit just items created by users with the same role. But it’s a good enhancement to add in a future.
The nearest feature is to list all users ID from that role as the allowed list of authors for this role posts edit restrictions at the “with author user ID” field.This workaround may not be applicable though if you do not plan to give the ‘edit_others_posts’ capability to this role. A limited read only access to the list of Media library items is not realized.
VladimirKeymasterHi Luis,
Default menu at the top right corner under current user name is:
– Edit My Profile;
– Log Out.Are they available? Or full admin menu bar was not available for this user.
Is ‘Close Session’ button available to the built-in subscriber role?
Check the plugin which adds ‘Close Session’ button. May be it has an option to show such button for the selected roles only, etc.VladimirKeymasterYou are at 1 step from the needed solution:
– Revoke capabilities you gave directly to colegioinfantil user.
– Grant him the same capabilities via role at that site. You may create a new role as a copy of the subscriber role and add edit posts capabilities set to it.
– After that open “Admin menu” for that role: you will see all available menu items from yesterday screenshot and may select unneeded menu items to block them.VladimirKeymasterHi Luis,
Show a screenshot of the page with this user capabilities: go to the ‘Users’ menu and click ‘Capabilities’ link under this user role. I’m sure that this user has more capabilities or even roles than just a ‘Subscriber’ one. User should see just ‘Dashboard’ and ‘Profile’ menu items with the only ‘Subscriber’ role.
VladimirKeymasterHi Luis,
You should activate this add-on at “Settings->User Role Editor->Additional Modules” tab. Then you will see “Admin menu” button at “Users->User Role Editor”.
VladimirKeymasterI may only suppose that some difference in the plugins list/settings exist. At my tests role with these capabilities:
create_shop_orders
delete_others_shop_orders
delete_private_shop_orders
delete_published_shop_orders
delete_shop_orders
edit_others_shop_orders
edit_private_shop_orders
edit_published_shop_orders
edit_shop_orders
publish_shop_orders
read_private_shop_ordersworks with orders (may add a new order) without problem too.
Try to deactivate all plugins except WC and URE. Check if some ‘must use’ plugin works or ‘functions.php’ from the active theme was modified and contains some related code.
VladimirKeymasterI will add the support for this argument directly to User Role Editor Pro with the next update.
Done for the development version 4.29.b4. It’s available for testing from the “Download” page.
VladimirKeymasterHi,
Thanks for paying my attention on this problem.
It depends from what filter you will use (may be use have some custom filters).
In order to allow WC to use a filter by customer wee need to mark as ‘allowed’ the ‘_customer_user’ URL parameter, like this:add_filter('ure_admin_menu_access_allowed_args', 'allow_events_filter', 10, 1); function allow_events_filter($args) { $args['edit.php'][''][] = '_customer_user'; return $args; }
I will add the support for this argument directly to User Role Editor Pro with the next update.
In general ‘edit_posts’ capability is not required to allow work with WC Orders. This custom post type has its own set of user capabilities – ends with ‘_shop_orders’.
WooCommerce does not allow access to backend to any user without ‘manage_woocommerce’ or ‘edit_posts’ capability. But there is a workaround for this.
So you will not need to block access to “Posts” menu it this case.VladimirKeymasterHi,
It’s possible to use “Admin menu access” add-on to check what user capability protects the selected plugin menu item:
– activate admin menu access add-on;
– open ‘administrator’ role at User Role Editor;
– click “Admin Menu” button;
– find menu items related to the “Forms” plugin.It’s the “edit_posts” for “FM Email Verification” menu and “manage_options” for “Form Maker”, “Form Maker Addons” menus. Every item of the “Form Maker” submenu is protected by “manage_options” capability too.
The next step is create a role which has access to the WordPress back-end, start from a subscriber role, add to it “manage_options” user capability and block for it the unused menu items.
Look at the demo video.24/09/2016 at 03:12 in reply to: Serious problem with user not able to edit content blocks. Settings are correct. #2790VladimirKeymasterGood news. After repeating exact settings as on your stage site I can repeat a problem at my local dev. environment. On the 1st glance, URE applies restrictions some time before “content_block” custom post type is defined so it can not check permissions on its edit correctly. I will proceed with testing and return to you with the solution.
-
AuthorPosts