Forum Replies Created
-
AuthorPosts
-
Vladimir
KeymasterHi Nigel,
Thanks for the information. There is a mistake in the condition that prevents single admin from blocking menu items for himself. I will include a fix to the next update.
As a quick fix you may open user-role-editor-pro/includes/pro/classes/admin-menu-view.php and replace line #133$readonly_mode = (!$lib->multisite && $allowed_roles[0]=='administrator') || ($lib->multisite && !is_super_admin());
with this one:
$readonly_mode = (!$lib->multisite && $allowed_roles[0]=='administrator') || ($lib->multisite && !is_super_admin() && $allowed_roles[0]=='administrator');
24/02/2016 at 02:51 in reply to: Restrict access to Gravity forms by Role and not just by user #2028Vladimir
KeymasterHi Josh,
Unfortunately, this feature is not available right now. But I hope to provide it in the near future.
Vladimir
KeymasterHi Nancy,
Thanks for the feedback.
Vladimir
KeymasterHi Nancy,
Thanks for the information. I will enhance this part of the code and include it to the next update.
It seems that
WP_DEBUG
constant is set to true at your site. It’s not recommended for the live sites. So 1st workaround is to set it tofalse
at wp-config.php file.
2nd way is to modify wp-content/plugins/user-role-editor-pro/includes/pro/classes/other-roles.php file replacing code phragment at lines 72-89 with this one:if (is_array($user->roles)) { foreach ($user->roles as $role) { if (isset($access_data[$role])) { if (!isset($access_data[$role]['access_model'])) { // for backward compatibility $access_model = 1; // Use default (block selected) access model $data = $access_data[$role]; } else { $access_model = $access_data[$role]['access_model']; $data = $access_data[$role]['data']; } if (empty($blocked['access_model'])) { $blocked['access_model'] = $access_model; // take the 1st found role's access model as the main one } // take into account data with the same access model only as the 1st one found if ($access_model==$blocked['access_model']) { $blocked['data'] = array_merge($blocked['data'], $data); } } } }
That is insert
if (is_array($user->roles)) {
just before it. And insert closing}
just after it.
I may send a modified file to your e-mail if it’s required.22/02/2016 at 00:27 in reply to: Problems creating new post with user having category/taxonomy ID restriction #2018Vladimir
KeymasterHi Bira,
This add-on does not give to a user new permission. It setups restrictions for the existing permissions only. So it should not allow to edit others posts until user actually has ‘edit_others_posts’ capability.
Some sites has tens thousands of users. Creation of unique term for every user is not very effective solution…
Vladimir
KeymasterHi Urs,
I confirm the described bug. Thanks for reporting it.
I will search a solution.Vladimir
KeymasterHello,
Is the same problem happened for the built-in role, like ‘author’?
Try to deactivate all plugins and check? If problem will go away, activate plugins back one by one to isolate a problematic code.19/02/2016 at 01:15 in reply to: Problems creating new post with user having category/taxonomy ID restriction #2010Vladimir
KeymasterHi Bira,
In my opinion, the correct way to solve this issue is for you to create a custom taxonomy called “ure” (for example) which has a single term called “allow” — and you assign THAT term to any new post by that user. This way, this term will never be deleted by any other plugin or function, your custom taxonomy is hidden and doesn’t clash with existing taxonomies, and by adding THAT you will ensure a user can always add posts even before or without setting the taxonomy he’s restricted to.
Thank you for the brilliant idea and useful note about
wp_set_post_terms()
function. Proposed decision allows to add new post without visible term assigned. This allows to have an option to “start a new post without any taxonomy” too.I will apply this enhanced logic to the next update. Thanks again.
18/02/2016 at 15:55 in reply to: Problems creating new post with user having category/taxonomy ID restriction #2005Vladimir
KeymasterThe fix for this issue was included into the version 4.23. Did you test with it?
Vladimir
KeymasterGood. Thanks for the feedback.
Vladimir
KeymasterIn relation to ‘shortcode’ this feature was realized:
Posts view restrictions includes a similar option ‘No role for this site’ also:I’m not sure that this add-on will work with BuddyPress though. I did not tested URE Pro with BuddyPress yet. It works with posts, pages and any custom post type. If BuddyPress page is a ‘post type’ like others then it should do the trick.
I should look at BuddyPress and make some tests to be sure.
Vladimir
KeymasterTry this code:
add_action('save_post', 'submit_for_review_update', 25 ); function submit_for_review_update($post_id) { if (empty($post_id)) { return; } $post = get_post($post_id); if (!is_object($post)) { return; } if ($post->post_type=='revision') { return; } $current_user = wp_get_current_user(); if (in_array('author', $current_user->roles) && $post->post_status=='publish') { $my_post = array( 'ID' => $post_id, 'post_status' => 'pending', ); remove_action('save_post', 'submit_for_review_update', 25); wp_update_post($my_post); add_action('save_post', 'submit_for_review_update', 25); } }
Vladimir
KeymasterHello,
This part was not changed from a very begin. Method PucFactory::addVersion() is defined at the same file, line #1041. I suppose you may have installed another version of class PucFactory, as it’s defined here just in condition that it does not exist yet, line #963:
if ( !class_exists('PucFactory') ):
Could you please check, what other plugin causes this conflict?
Vladimir
KeymasterHi Bira,
Thanks for letting me know that a problem was resolved.
Especially thank you for the bug report (user-role-editor-pro/includes/pro/classes/posts-edit-access.php on line 171). I really used a wrong class name there. I will fix it with a next update.
Vladimir
KeymasterHi,
I found and fixed the bug with plugin update from the WordPress multisite “Network Admin – Plugins” page. I will include this fix into the next update.
-
AuthorPosts