Forum Replies Created
-
AuthorPosts
-
VladimirKeymaster
What is set for this user role at ‘Admin Menu’ module? Show a screenshot.
VladimirKeymaster– Go to “Network Admin->Users”.
– Select user, click ‘Capabilities’ under his row.
– Click ‘Network Update’.Pay attention that role and capabilities (assigned to the user) are shown here for the main site. So before replicate user to the full network assign him needed permissions for the main site.
VladimirKeymasterHi Jawad,
1) User can not see the list of products without ‘edit_products’ capability. So if you have activated with URE ‘create’ capability, giving user ‘read’, ‘edit_products’ may be enough to get a ‘read-only’ access’ to the list of products with assumption that this user did not created any product. He can not created a new product, he can not edit products created by others, he can not edit published products. Be aware that user should have at least ‘edit_posts’ or ‘manage_woocommerce’ capabilities or special filter should be set to give him access to the admin back-end.
2) I confirm the issue with ‘Products->Attributes’ access by direct link. I will investigate and fix this bug.
3) Let me know what additional plugin do you use. I installed ‘Revolution Slider’ but don’t see any additional meta box at WooCommerce Coupon edit page.
VladimirKeymasterHi,
Currently there is no such feature in URE – setup view restriction on the category level. Thanks for the good suggestion. I will look how to realize it.
VladimirKeymasterHi,
Is this user an author of this post? If he is not, ‘edit_others_posts’ capability is required.
This module does not give new permissions to the user. It just restricts the existing permissions.
Meta box at the bottom of the post is related to ‘view’ permission for this post at front-end. If you plan to show this post not to the pepperRole only, you don’t need to setup this view restriction.
VladimirKeymasterJawad,
Quick fix is open includes/pro/classes/meta-boxes.php file and replace 11 priority at lines 26,27,28 to the 99, like this
add_action('add_meta_boxes', array($this, 'remove_blocked_metaboxes'), 99); add_action('wp_dashboard_setup', array($this, 'remove_blocked_metaboxes'), 99); add_action('wp_user_dashboard_setup', array($this, 'remove_blocked_metaboxes'), 99);
As I discovered WooCommerce added its metaboxes with 20 and 30 priorities. So we should use higher priority to remove them later than they were added.
VladimirKeymasterJawad,
Please ignore my ask to send me debug information about meta boxes. I found that post edit page (including one belongs to WooCommerce) may contain an empty meta box data. I will update URE’s code for this case.
VladimirKeymasterWhen you said ‘Edit posts restrictions’ did you mean
I meant this add-on activated and its settings made at user profile:
Notice: Undefined index: id in /wp-content/plugins/user-role-editor-pro/includes/pro/classes/meta-boxes.php on line 46
It’s not error, just notice. If you set WP_DEBUG to false at wp-config.php file, this message will not be shown.
I can not repeat this. Every meta box should have ID. URE goes through the full list of meta boxes available at this page here. So you have some strange metabox.You may help if you open includes/pro/classes/meta-boxes.php file and insert at line 39:
var_dump($wp_meta_boxes); die;
Open ‘Add Order’ page, copy output and send it to support [at-sign] role-editor.com
Then remove this debug code.if I enable ‘delete_product’ should I also enable ‘delete_products’
I wrote above that it’s not required to include meta capability like ‘delete_product’ directly to the role. It’s enough ‘delete_products’. But WooCommerce does this for its own roles, like ‘Shop Manager’. So repeat it too, include both.
VladimirKeymasterJawad,
1) Check if there are no any restrictions set for this user at his ‘Edit posts restrictions’ section.
2) ‘edit_post’, ‘delete_post’ are so called meta capabilities which are mapped by WordPress to the real user capabilities ‘edit_posts’, ‘edit_others_posts’, etc.
For example you check if user can edit the post. If it’s his post, it’s enough to have ‘edit_posts’. Then if this post is published, it’s needed to have ‘edit_published_posts’.
That is for 1 ‘edit_post’ meta capability 2 real capabilities are required. In case user is not an author of this post, WordPress will check if user has ‘edit_others_posts’, etc.
Look at
wp-includes/capabilities.php map_meta_cap()
function for more details.There is no need to add meta capabilities directly to the roles by my opinion. But WooCommerce makes this.
VladimirKeymasterAbout blocking admin notices:
VladimirKeymasterYes, ‘edit_shop_orders’ is a required one.
VladimirKeymaster1) Admin notices – not so fast. I’m working on the answer currently.
2) You may turn ON this option ‘Activate “Create” capability for posts/pages/custom post types”. ‘create_posts’, ‘create_pages’, ‘create_products’ capabilities will be appear in the User Role Editor. Add them to the roles which should add posts, pages, products and other registered custom post types. Role without ‘create_products’ capability will can not add new product – just edit the existing one.
VladimirKeymasterJawad,
I understood now.
It’s a products list page. Screen options here are not related to the meta boxes. These options are table columns. It’s not possible to hide them with current version of URE currently. I will look what it’s possible to do with it.VladimirKeymasterHi,
Did you open Meta Boxes after you visited this ‘edit product’ page?
VladimirKeymasterHi,
1st way: Create a copy of instructor role with admin bar not hidden and assign it to this special user instead of ‘instructor’ role.
2nd way: do not hide admin bar for the instructor role. Create separate empty role with admin bar hidden and add it to the users with instructor role.
-
AuthorPosts