Forum Replies Created
-
AuthorPosts
-
27/10/2021 at 03:26 in reply to: Multi-Author permission for company profile in a business directory #7741
Vladimir
KeymasterHello,
I don’t know plugins to recommend for this use case.
Look if you may use the URE Pro add-on, if it is suitable:
1) Content view restrictions – if company listing profile is a separate page and changes are made via front-end.
2) Posts/Pages edit restrictions – if company listing profile is a separate page and is edited via back-end at the page editor.
3) Other roles access add-on.If you can setup the list of user roles for your needs, user limited via “Other roles access” can grant only roles available for him and see users with this roles list only.
Vladimir
KeymasterVladimir
KeymasterMay be you can isolate what plugin or theme load its CSS globally and breaks a view at the URE’s page – just deactivate all plugins, activate WordPress 2021 theme, then test activating them back one by one.
Vladimir
KeymasterHi,
Do you have own suggestion for this fix?
If No, I need to look at the issue at the dev/stage copy of your site.Vladimir
KeymasterThere is no such setting in the URE plugin. Generally anyone can comment. Other depends from the comment system you use. Only post authors and editors can moderate comments.
Vladimir
KeymasterHi Janneke,
URE does not restrict user with ‘administrator’ role in any manner. Thus you can not select ‘administrator’ role for restriction at any add-on.
You may use a copy of administrator role for the selected users, which it’s possible to restrict.
Vladimir
KeymasterHi Erik,
I updated the code to fix the issue. Take a look.
22/10/2021 at 04:38 in reply to: Core WP Administrator has no access permissions on frontend other roles #7730Vladimir
KeymasterI suppose, that plugin responsible for the front-end access to the downloads checks not user capability, but user role. If this plugin has settings for the list of role, allowed to download, add ‘administrator’ to that roles list.
Vladimir
KeymasterHi,
Thanks a lot for pointing to this bug. It’s a typo. Quick fix: open post-edit-access-role.php file for editing and replace plus ‘+’ character with this the dot: ‘.’
Correct version of line #72:return array('result'=>'success', 'message'=>'Posts edit permissions for role:'. $role_id, 'html'=>$html);I included this fix to the next release.
Vladimir
KeymasterHi Erik,
You are right. To make it universal use right version of the query with “IN ($ag)”, which currently is commented out by /* … */. Hardcoded ‘SBU004’ may stay there from the testing/debugging stage.
Vladimir
KeymasterHi,
Sorry for the delay. Let’s wait for the end of month. I will try to add this feature to the next update I plan to publish at the end of October – begin of November 2021.
Vladimir
KeymasterHi,
Additional authentication parameters are required for the API calls. This post may help
Vladimir
KeymasterURE does not include suitable hooks to rename plugin. FYI, I do not appreciate this.
Yes, if you will replace plugin name directly in the plugin source code, the changes will be overwritten every time you will install updated version.
Vladimir
KeymasterI successfully tested custom code for your scenario with URE Pro edit restrictions add-on activated together:
1) Activate edit restrictions add-on.
2) Install code below as a Must Use plugin or add it to the active theme functions.php file:add_filter('ure_post_edit_access_authors_list', 'ure_modify_authors_list', 10, 1); function get_orders_manager_users() { global $wpdb; $role = 'sales_agent'; $where = $wpdb->prepare( 'meta_value LIKE %s', '%'. $wpdb->esc_like( '"' . $role . '"' ) .'%' ); $query = "SELECT user_id FROM {$wpdb->usermeta} WHERE $where"; $result = $wpdb->get_results( $query ); if ( empty( $result ) ) { return ''; } $users_list = array(); foreach( $result as $user ) { $users_list[] = $user->user_id; } return $users_list; } function ure_modify_authors_list( $authors ) { $user = wp_get_current_user(); if ( !in_array( 'sales_agent', $user->roles ) ) { return $authors; } $users_list = get_orders_manager_users(); $authors1 = implode(',', $users_list ); if ( !empty( $authors ) ) { $authors .= ','. $authors; } else { $authors = $authors1; } return $authors; }As a result any user with sales_agent role will be restricted in orders editing by authors list equal the list of users with the sales_agent role.
Vladimir
KeymasterIf you pre-install URE to the site, input the license key or add it to WordPress configuration via PHP constant, like below:
// User Role Editor Pro License Code define('URE_LICENSE_KEY', '5ae21 ... a75de');and use has permissions to update plugins (update_plugins), there is not need to have access to URE settings. Such user will can install URE updates via ‘Dashboard->UPdates’ with any other plugin update together.
-
AuthorPosts