Forum Replies Created
-
AuthorPosts
-
Vladimir
KeymasterWC uses the same post type for the reviews – ‘product’. So we have to use additional code in order achieve your purpose. Working on you problem I found/fixed some bugs in the current version of URE Pro. So, download version 4.63.b1 from the “Downloads” page (login first).
1) Grant all product edit permissions to your role, test-role-1 in my example.
2) Block “Products” menu item for this role via “Admin Menu”.
3) Activate “Post/page edit restrictions” add-on: https://www.role-editor.com/allow-user-edit-selected-posts/
4) Set for user “Look at roles” at the “Posts/Pages/Custom Post Types Editor Restrictions” section.
5) Open “Post Edit” for your role and select “Prohibit” and “Products” post type.
6) Add code below to your active theme functions.php file or set up as a Must Use plugin:
add_filter('ure_restrict_edit_post_type', 'ure_edit_review_but_not_product', 10, 1 );
function ure_edit_review_but_not_product( $post_type ) {if ( $post_type!=='product') {
return $post_type;
}$user = wp_get_current_user();
if ( empty( $user ) || !in_array( 'test-role-1', $user->roles ) ) {
return $post_type;
}
if ( !isset( $_GET['page'] ) || $_GET['page']!='product-reviews' ) {
return $post_type;
}return false;
}
Replace ‘test-role-1’ above with your own role ID.As a result, user with full product edit permissions will can moderate reviews, but can not see/edit products at admin back-end.
Vladimir
Keymasterprnt.sc is not reachable for me. Did you add edit_products, edit_published_products, edit_others_products capabilities to make reviews editable for this role?
Vladimir
KeymasterHi,
As workaround grant for such role: read, view_admin_dashboard, moderate_comments and edit product capabilities. But block “Products”, “All Products” menu items via “Admin menu blocking” add-on:
https://www.role-editor.com/block-admin-menu-itemsVladimir
KeymasterHi,
I see the only way to solve this task – create 2 roles:
1) create, modify and delete all articles and create, edit, delete pages only;
2) edit specific pages from other users according restriction by its ID.
Grant those role to different WP users. When someone need to work with role 1 he logins with user 1, when with role 2 – he re-logins with user 2.Is this workaround applicable for in your case?
24/08/2022 at 04:16 in reply to: How to restrict the user role “Author” from viewing “Comments”? #8024Vladimir
KeymasterHi,
You can block ‘Comments’ menu for Author role using “Admin menu access” add-on:
https://www.role-editor.com/block-admin-menu-items19/08/2022 at 14:37 in reply to: How to add capability for Meta Tag Manager for non-admin user role #8018Vladimir
KeymasterHi,
Grant ‘list_users’ capability to this user role.
Vladimir
KeymasterHi,
Is it Gravity Forms add-on?
Can you share this plugin .zip via Google Drive, DropBox or similar for the investigaion?Vladimir
KeymasterHi,
It’s better to deactivate plugin at the older place before activate it at a new one.
Btw., license key is important only for access to the automatic updates. Plugin does not block/hide itself due to license state.Try login as a user with WP built-in administrator role. URE makes itself available for this role automatically. If you don’t see URE as such user, try to deactivate URE and activate it back. If it’s not visible at the “Plugins” page make this via FTP:
– rename user-role-editor-pro folder to user-role-editor-pro-1;
– open ‘Plugins’ page again. WP will automatically deactivate URE, is its files are not available;
– rename URE folder back to user-role-editor-pro;
– return to “Plugins” page and activate URE again.
URE tries to grant its user capabilities to administrator role on activation.Vladimir
KeymasterIf it’s applicable, send admin credentials and what role did you restrict to support [at-sign] role-editor.com
I will investigate the issue.Vladimir
KeymasterHi,
Unfortunately, No. URE does not offer additional restrictions for the bbPress. It manages only bbPress’s own user capabilities.
27/06/2022 at 04:08 in reply to: I have enabled all options for a CPT but my user cannot add a new one #7986Vladimir
KeymasterQuick workaround, leave ‘create_posts’, but block access to the ‘Posts’ menu via “Admin menu access“.
I suppose you met some conflict between URE Pro and code which registers ‘hr_pages’ custom post type. If you provide me access to a copy of that plugin or theme, I will try to find a reason.
24/06/2022 at 11:55 in reply to: Main category is deleted each time a specific role updates a post. #7981Vladimir
KeymasterHi,
Try to define if some plugin is involved. Deactivate all plugins and test. If issue will go away, activate plugins back one by one with a new test to isolate a reason.
Vladimir
KeymasterNo, it’s not possible with URE Pro. URE Pro provide access management for WordPress UI only, while direct access to the files via URL is managed by web server software, e.g Apache or Nginx.
Vladimir
KeymasterWordPress itself requires ‘manage_categories’ user capability. URE plugin does not change this.
To isolate a reason try to deactivate all plugins and test. If it will help, activate plugins back one by one with a new test until the problem will raise again.
Vladimir
KeymasterHi Andreas,
It would be a role from some plugin, which re-creates it dynamically on every page open. Share this role ID. Some roles include a part of plugin name to its IDs.
Or try temporally deactivate all plugins except URE. Will you can update role after that?
If Yes, activate plugins back one by one and make new test to isolate a plugin to which this role belongs. -
AuthorPosts