Forum Replies Created
-
AuthorPosts
-
VladimirKeymaster
Hi,
Feeds are filtered by current version – just re-tested.
There is something special for your installation, may be a conflict with some plugin.
Do you have (can setup) a stage/development copy of this site to repeat this issue and where I may test it on-line?In other case try to deactivate temporally all plugins except URE Pro. Will it change posts listed in the feed?
VladimirKeymasterI developed a fix for this. It works conditionally now and takes an account the result from custom filter:
add_filter('ure_not_block_other_roles_for_local_admin','ure_block_other_roles_for_local_admin'); function ure_block_other_roles_for_local_admin($flag) { return false; }
You may add this code to the active theme functions.php file or setup it as a “must use” plugin.
In order this filter start to work you need to replace 3 files at current 2.28.2 version folder:
includes/classes/ure-lib.php
pro/includes/classes/other-roles-access.php
pro/includes/classes/ure-lib-pro.phpI will send the zip with updated files above to your email.
Of course this update will be included to the next version. Development version beta5 is on the road to the public testing stage currently (includes some unfinished changes) so I do not make it available for a while.VladimirKeymasterTimeout. Recommendation above will not work. I search a solution.
VladimirKeymasterHi,
Currently User Role Editor Pro “Other Roles Access” add-on does not apply any restrictions for the users with ‘administrator’ role. My apologies for confusion as URE allows to edit the other role access restrictions for ‘Administrator’ role at the same time.
I will add a custom filter for this with a next update. So you may change this logic – apply other roles restrictions to the local administrators under multisite or not.
A quick workaround for current 4.28.2 version: open wp-content/plugins/user-role-editor-pro/pro/classes/other-roles-access.php file and comment lines 125, 126, 127, so you should get this code:
protected function blocking_needed() { global $current_user; // do not block data for superadmin $multisite = $this->lib->get('multisite'); if ($multisite && is_super_admin()) { return false; } // do not block data for local administrator //if ($this->lib->user_has_capability($current_user, 'administrator')) { // return false; //} // user can update access to other roles if ($this->lib->user_has_capability($current_user, self::other_roles_access_cap)) { return false; } ...
VladimirKeymasterKevin,
As a quick fix you may replace the file
wp-content/plugins/user-role-editor-pro/pro/includes/classes/admin-menu-url-allowed-args.php
with the file from the zip attached to the message I emailed you directly.Let me know the result when you find a time to test it.
VladimirKeymasterHi Kevin,
Thanks for the additional information. I reproduced this issue. It’s the bug.
As we apparently allow just ‘edit-comments.php’ URL under ‘block on not selected’ model URE blocks by default any URLS which differs from ‘edit-comments.php’.I should add ‘comment_status’ to the list of allowed parameters for ‘edit-comments.php’. I will do it with the next update to User Role Editor Pro.
I will let you know when development version with this update will be available for testing. I will try to prepare it until October 10th, 2016.VladimirKeymasterThanks for the feedback.
05/10/2016 at 01:54 in reply to: Unable to Restrict Access within WP Admin on One Specific Site #2843VladimirKeymasterHi Kevin,
Thanks for sharing this information.
VladimirKeymasterHi Kevin,
Such problem may appear when you use “Admin Menu Access” add-on to block some menu items. URE thinks that URL with unknown parameters like ‘comment_status’ are prohibited. There is a workaround for this.
Show me the screenshots what settings you made with “Admin Menu” for the role which is redirected to dashboard when you try to use filtering tabs at the Comments page. I will try to reproduce your situation and recommend a solution.
VladimirKeymasterTry this variant. I removed the “Account Details” from the left menu items too, as it’s the only available my account endpoint and it’s not sense to place the link on the same page.
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['edit-account'])) { unset($items['edit-account']); } if (isset($items['payment-methods'])) { unset($items['payment-methods']); } return $items; } function redirect_from_blocked_url() { $my_account_url = wc_get_endpoint_url('edit-account'); wp_redirect($my_account_url); die; } function check_end_point_url($end_point, $current_url) { $blocked_url = wc_get_endpoint_url($end_point); if ($current_url==$blocked_url) { redirect_from_blocked_url(); } } function redirect_for_blocked_wc_pages() { global $wp, $wp_query; if (!current_user_can('subscriber')) { return; } if (is_account_page() && !is_wc_endpoint_url()) { // block Woo My Account Dashboard; redirect_from_blocked_url(); } $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); } }
VladimirKeymasterResolved (discussed via email).
Update was included into the development version 4.29.VladimirKeymasterThanks for the feedback. I will look if it’s possible to change the default page for “My Account”.
VladimirKeymasterGot it. Thanks. I will contact you with a solution in 1-2 days.
VladimirKeymasterRight. Send that URL to support [at-sign] role-editor.com. I need to see a full structure to take a solution how to resolve this issue.
VladimirKeymasterSo there is no ‘wp-login.php’ in the logout URL?
-
AuthorPosts