Forum Replies Created
-
AuthorPosts
-
Vladimir
KeymasterThanks. I got it. I will try to isolate the issue.
Vladimir
KeymasterHi,
I tested a restricted user with WP built-in posts. Search function at the “Insert Link” window works as expected and showed a post, while it’s prohibited for editing, that is unavailable for this user at the main posts list.
Check if there are any JavaScript errors at the browser console.
Vladimir
KeymasterHi Sarah,
Can you share with me (support [at-site] role-editor.com) via DropBox or similar a copy of site files (without wp-uploads) and exported database (possibly without wp_users table)?
I will investigate your report using your own data then.
09/11/2017 at 05:35 in reply to: using the ure_restrict_edit_post_type filter with custom taxonomy #4387Vladimir
Keymaster‘ure_restrict_edit_post_type’ filter influences to the whole post type (restrict it or do not restrict), not on the current post only. So condition
has_term( 'finance-resources', 'department' )
is not applicable here.
What if to use another blocking model, that is ‘Block’ instead of ‘Allow’. Then URE will hide blocked terms, but any other will still be available.
For example you have categories: 1, 3, 8, 9, 15 and a lot of terms from other taxonomies. You wish to allow to edit just category 3 from the “Categories” taxonomy. Then select “Block” and input into categories ID list field: 1, 8, 9, 15. It should give you a need effect.I will add a custom filter for terms ID list into the next version. So it will be possible to set the list of prohibited posts by program not manually, which will provide a possibility of a more universal solution.
Manage restrictions directly for the different taxonomies available for the same post type seems a complex task, due to data structure used by WordPress. I suppose also that this feature is not in a high-demand category.
There is a ‘ure_edit_posts_access_id_list’ custom filter which allows to set posts ID list to allow or block for editing.
So you can scan posts list for current user role and built a posts-list by your own checking any terms and taxonomies for the single post from a list of available posts.It’s possible to set a restriction type via custom filter too. For example:
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) { $restriction_type = 2; // Block return $restriction_type; }
Vladimir
KeymasterHi,
Do you use WordPress built-in front-end menu to show those links? If ‘Yes’, you can use ‘Front-end menu access’ add-on and setup, what role can see what menu item.
Vladimir
KeymasterHi,
I can not repeat an issue and thus – isolate a reason. What will be if you deactivate User Role Editor Pro at all?
Look at a browser JavaScript console also. Are there any error messages before and after click “Live Editor” link at top admin menu bar?
Does ‘Live Editor’ toolbar button work if a user with custom role will click it from the regular edit page?
Vladimir
KeymasterI added ‘_wpnonce’ just in case… There is other link (Duplicate) at the page which contains this argument.
Vladimir
KeymasterIt seems that it’s critical for PHP versions 5.3 and earlier. PHP 5.4+ should parse such code normally. Do your sites still work under unsupported PHP version?
It’s time to think about an upgrade: PHP supported versions.
Vladimir
KeymasterHi,
Thanks for this information.
Developing and testing under PHP 7.0, I missed somehow an earlier PHP versions.
Quick workaround – replace line 64 at /wp-content/plugins/user-role-editor-pro/pro/includes/classes/page-permissions-view.php$capability = array_values($caps)[0];
with this version:
$caps_list = array_values($caps); $capability = $caps_list[0];
Or rollback to previous version and wait an updated version. I will publish it next 1-2 weeks.
Vladimir
KeymasterThanks for the clarification. Did you restrict this role with “Admin menu”?
Will ‘Live Edit’ link work normally if you deactivate “Admin menu access” add-on?Vladimir
KeymasterHi Urs,
Code for LayerSlider URL arguments will be:
add_filter('ure_admin_menu_access_allowed_args', 'ure_allow_arg_for_admin', 10, 1); function ure_allow_arg_for_admin($args) { $args['admin.php']['layerslider'][] = 'id'; $args['admin.php']['layerslider'][] = 'action'; $args['admin.php']['layerslider'][] = '_wpnonce'; return $args; }
06/11/2017 at 12:50 in reply to: using the ure_restrict_edit_post_type filter with custom taxonomy #4371Vladimir
KeymasterThanks for the clarification. I will think about this.
Vladimir
KeymasterHi Urs,
Older version of LayerSlider 5.4.0 (I have on hands) uses ‘manage_options’ capability to protect its menu.
06/11/2017 at 05:38 in reply to: using the ure_restrict_edit_post_type filter with custom taxonomy #4367Vladimir
KeymasterYou can restrict access to the ‘document’ custom post type editing by input department taxonomy ID as a restrictions criteria for the role ‘finance’.
A purpose of this filter is to exclude posts type from edit restrictions for all users or some role as edit restrictions are applied to all post types by default. It’s not planned to apply this filter to the selected post (item inside custom post type) by some criteria. Using this filter you can allow to edit all posts for the current user or just a subset of post according to the criteria for this user and his role(s).
02/11/2017 at 16:23 in reply to: Give a role access to edit a spesific menu in Appearance > Menu #4354Vladimir
KeymasterHi,
This feature would be a good addition to User Role Editor Pro. Currently it’s not realized.
-
AuthorPosts