Forum Replies Created
-
AuthorPosts
-
VladimirKeymaster
Yes, it’s by design. When you select role at the “Make copy of” field of the “Add role” dialog URE processes only the list of user capabilities of the selected role, nothing else.
VladimirKeymasterCurrent version does not allow to realize this.
I will add to the next update the additional parameter “Blocking Model”, e.g.
Block: () Selected () Not Selected.
When “Not selected” choice will be made, URE will block all widgets/sidebars, which checkboxes are not turned ON, including any new items.VladimirKeymaster@ElizabethM: Thanks for your help.
Learndash (LD) plugin source code checking showed that LD uses 10 additional capabilities to manage access for quizies:
wpProQuiz_show
wpProQuiz_add_quiz
wpProQuiz_edit_quiz
wpProQuiz_delete_quiz
wpProQuiz_show_statistics
wpProQuiz_reset_statistics
wpProQuiz_import
wpProQuiz_export
wpProQuiz_change_settings
wpProQuiz_toplist_editYou can find them under the ‘Custom capabilities’ group. LD grants these capabilities automatically to the ‘administrator’ role only. Did you try to grant them to your custom role in order to resolve the permissions problem?
Of course role should can all capabilities required by at least the LD courses custom post type:
delete_courses
delete_others_courses
delete_private_courses
delete_published_courses
edit_courses
edit_others_courses
edit_private_courses
edit_published_courses
publish_courses
read_private_coursesLet me know if you need the additional help.
VladimirKeymasterCan you share with me the latest version of Learndash? If Yes, share it with support [at-sign] role-editor.com via Google Drive or DropBox.
VladimirKeymasterThanks.
I downloaded plugin copy successfully and remove the link about to hide it from public.
I will let you know when I will have a progress with the subject.VladimirKeymasterTake into account how URE works with meta boxes. Meta box exists only at the page for which it was created. Post meta boxes exists only at the post editor page, etc. So URE remembers active meta boxes when user opens pages. So to see meta boxes list at the URE “Meta boxes” dialog you have to “show” those meta boxes to URE.
When user deactivates plugin, which have created meta boxes, those meta boxes are still shown at the URE’s list. That’s why a ‘X’ icon to the right of every meta box row is presented – to remove from URE’s list a meta box, which does not exist at WordPress anymore. It works globally for all roles at once.
1) URE does not restrict administrator role in any manner. All URE add-ons follows this rule – administrator as superuser can do and see all.
If you need power user with less permissions than superuser, create a copy of administrator role and restrict it.2) If you suddenly delete some meta box from URE list, it’s easy to return it back – just open the page where this meta box is shown. URE will remember this meta box again.
3) Possible has sense. But user will have to “teach” URE again after that – open pages with meta boxes, in order URE can catch and remember them.
VladimirKeymasterHi Mike,
It’s not possible with UI at wp-admin. You may use any SQL tool, like phpMyAdmin or MySQL WorkBench, and execute this command:
SELECT DISTINCT wp_users.ID, wp_users.user_login, wp_usermeta.meta_value FROM wp_usermeta JOIN wp_users on wp_users.ID=wp_usermeta.user_id WHERE wp_usermeta.meta_key='wp_capabilities' AND wp_usermeta.meta_value NOT LIKE '%subscriber%' ORDER BY wp_users.ID;
Just replace ‘wp_’ at the database tables names with your DB prefix from wp-config.php.
Make the same replacement for the meta_key ‘wp_capabilities’ value.
Command above will show the list of all users without subscriber role.VladimirKeymasterIt seems I fixed the issue. Make another test and share the result.
The reason was at the filtering code from functions.php:
$ag = get_field('analytics_group_name','user_' . $current_user->ID); if ( !isset( $ag ) ) { return ''; }
get_field() may return ”, and !isset() check was wrong in the such case. I replaced !isset() with empty():
if ( empty( $ag ) ) { return ''; }
and ‘Pages’ started to open with the single page only.
VladimirKeymasterHi Erik,
I reproduced the described issue. I will try to find a reason.
VladimirKeymasterYes, it’s a way to resolve the redirection issue caused by admin menu restrictions.
01/04/2020 at 11:36 in reply to: Pro Version – Multisite – Add new user -> editor -> all sites #6738VladimirKeymaster1st, add new user as editor to the main site.
2nd, go to “Network Admin->Users”, find just added user, click ‘Capabilities’ link under that user row.
3rd, click “Update Network”. URE Pro will add the user with role granted to him to all sites of the multisite network.Documentation article on the subject:
31/03/2020 at 15:13 in reply to: Access to all Posts of a specific Custom Post Type and limit other Pages by ID #6735VladimirKeymasterThis version just adds additional condition:
if ( in_array( 'scholarships', $user->roles ) ) { // Role ID if ($post_type=='scholarship') { // CPT ID $restrict_it = false; } } else if ( in_array( 'sdol-page-editor', $user->roles ) && in_array( 'applications_tools', $user->roles )) { // user has both roles at the same time if ( $post_type==='app_tools' ) { $restrict_it = false; // Do not restrict editing for Applications & Tools } }
31/03/2020 at 14:48 in reply to: Access to all Posts of a specific Custom Post Type and limit other Pages by ID #6734VladimirKeymasterUse ‘sdol-page-editor’ for the role ID and ‘app_tools’ for the post_type. If you return false for ‘app_tools’, URE will fully exclude this custom post type from edit restrictions.
Something like this:
if ( in_array( 'sdol-page-editor', $user->roles ) && in_array( 'applications_tools', $user->roles )) { // user has both roles at the same time if ( $post_type==='app_tools' ) { $restrict_it = false; // Do not restrict editing for Applications & Tools } }
31/03/2020 at 13:39 in reply to: Access to all Posts of a specific Custom Post Type and limit other Pages by ID #6731VladimirKeymaster1st issue was resolved. User icomm sees ‘Pages’ menu now. Problem was that his 1st role has “Admin menu” “Not Selected” blocking model, but the 2nd role – “Selected”. When URE builds general admin menu for 2 roles it take blocking model from the 1st role and if blocking model of the 2nd role is different then it’s ignored. As a result ‘Pages’ menu was blocked via “Admin menu” restrictions set for the 1st role.
2nd part, it’s possible to allow user to see/edit the single page via its ID, but has edit access to the full list of another custom post type. Use custom filter ure_restrict_edit_post_type for this purpose.
Let me know if you will need help with a code for this custom filter.
31/03/2020 at 05:14 in reply to: Access to all Posts of a specific Custom Post Type and limit other Pages by ID #6728VladimirKeymasterDoes such user see ‘Pages’ menu item or just doesn’t see any pages at the pages list?
Anyway I don’t see a problem with user capabilities granted to the user via roles.
Try to deactivate all plugins. Will it change something? If Yes, activate plugins back one by one to isolate a problem. -
AuthorPosts