Forum Replies Created
-
AuthorPosts
-
Vladimir
KeymasterOK. Thanks for sharing.
10/03/2021 at 14:56 in reply to: Editor Restrictions profile settings hidden when ure_manage_options is enabled #7413Vladimir
Keymasterure_manage_options – is the internal for User Role Editor user capability. If user can it, URE count it superadmin for URE itself. Thus URE does not restrict such user in any manner.
I doubt that WPMF checks ure_manage_options. It is more probable WordPress internal ‘manage_options’, which it may search as a substring occurrence in the user capabilities serialized value – just assumption. I can not say more without access to the WPMF source code. If you share it with support [at-sign] role-editor.com via Google Drive or similar, I may give you more details.
Vladimir
KeymasterHi,
One of the updates included into the recent version 4.59.2:
– Option “Force custom post types to use their own capabilities” replaces default capabilities for the custom taxonomies also. It takes the slug of the 1st post type associated with such taxonomy (e.g. ‘video’) and builds own capabilities this way: manage_terms->manage_video_terms, edit_terms->edit_video_terms, delete_terms->delete_video_terms, assign_terms->assign_video_terms. URE automatically adds such capabilities to the ‘administrator’ role. You have to grant these new capabilities to other roles manually.Filter custom capabilities by word ‘terms’ via ‘Quick Search’ and grant needed capabilities to needed role.
Vladimir
KeymasterHi,
You have to resolve this issue with Tutor LMS developers.
Tutor LMS automatically restricts all users, who are don’t have role ‘administrator’, but have role ‘tutor_instructor’, by posts created by current user – for all post types, including WooCommerce products, orders, etc. I think, this is a bug, and they should restrict access for the own custom post types only, not for all as they do currently.
I tested free version of Tutor LMS. I granted to user with editor role the 2nd role – tutor_instructor. Editor automatically lost access to the all posts and pages except his own.
Here is the code responsible for the problem (tutor/classes/Admin.php):
add_action('admin_init', array($this, 'filter_posts_for_instructors')); ... /** * Filter posts for instructor */ public function filter_posts_for_instructors(){ if ( ! current_user_can('administrator') && current_user_can(tutor()->instructor_role)){ @remove_menu_page( 'edit-comments.php' ); //Comments add_filter( 'posts_clauses_request', array($this, 'posts_clauses_request') ); } } public function posts_clauses_request($clauses){ global $wpdb; $user_id = get_current_user_id(); $get_assigned_courses_ids = $wpdb->get_col($wpdb->prepare("SELECT meta_value from {$wpdb->usermeta} WHERE meta_key = '_tutor_instructor_course_id' AND user_id = %d", $user_id)); $custom_author_query = "AND {$wpdb->posts}.post_author = {$user_id}"; if (is_array($get_assigned_courses_ids) && count($get_assigned_courses_ids)){ $in_query_pre = implode(',', $get_assigned_courses_ids); $custom_author_query = " AND ( {$wpdb->posts}.post_author = {$user_id} OR {$wpdb->posts}.ID IN({$in_query_pre}) ) "; } $clauses['where'] .= $custom_author_query; return $clauses; }
Vladimir
KeymasterRole should can at least ‘read’ capability in order have access to admin backend.
Then follow the steps described at “this article for similar task.Vladimir
KeymasterHi,
Thank you.
Vladimir
KeymasterHi,
According to WordPress built-in permissions logic:
– User can not edit any posts if he does not have ‘edit_posts’. User can not edit posts created by other users if he does not have ‘edit_others_posts’.Thus, ‘edit_posts’, ‘edit_others_posts’ capabilities are required both in order user can edit posts created by other users.
URE shows ‘with author user ID’ field for user or role if it can at least ‘edit_others_posts’ or ‘edit_others_pages’ and restricts posts available for editing by posts created only by users which ID are listed in this field.
I can just suppose according to your description, that some other plugin may change default WordPress permissions logic. Try temporally deactivate all plugins except URE Pro and test what posts are available for editing to restricted user. If it will work as expected, activate plugins back one by one with new test in order to isolate a conflict.
Vladimir
KeymasterActivate/deactivate add-on is safe – all settings made for add-on are in place.
Settings are deleted only upon plugin deletion via WordPress.
If you will confirm that redirection to WP dashboard is due to URE Pro “Admin menu access”, I will need 2 screenshots in addition:
1) “Users->User Role Editor->Admin menu” made for the tested role;
2) “Tools->Redirection” page with browser URL address visible at the top.Vladimir
KeymasterHi,
Thanks for the suggestion. I work on adding this feature.
Vladimir
KeymasterYes, in general, redirection is a result of additional parameters in URL under “Block: Not Selected” model.
What will be, if you temporally turn OFF the “Activate Administrator Menu Access module” checkbox at URE settings. Will redirection still take place?
Vladimir
KeymasterHi,
Is role restricted via “Admin menu access” add-on?
If Yes, pay attention on the “Technical details – Block not selected” part of the documentation article.Vladimir
KeymasterHi,
Currently, export to CSV is standalone. It does not have “import from CSV” pair as topic author have asked about export feature only.
Export/Import is realized for a single role only.
23/02/2021 at 02:28 in reply to: Show plugins/themes notices to admin only – how to when admin role is duplicated #7378Vladimir
KeymasterExcellent!
I use “User Switching” plugin from John Blackbourn.
22/02/2021 at 02:31 in reply to: Show plugins/themes notices to admin only – how to when admin role is duplicated #7376Vladimir
KeymasterYou can use ‘Additional options for role>‘ feature and setup “Block admin notices” option, then turn it ON for your “not true” admin role.
Vladimir
KeymasterHi,
You can try the beta version 4.59.2.b3. It contains needed fix. It’s available after login from the same “Download” page.
-
AuthorPosts