Vladimir Garagulya
Forum Replies Created
-
Forum: Plugins
In reply to: [User Role Editor] Hide a specific pluginYes, it’s possible.
If plugin uses own user capability, you can just revoke such capability from a user role.
But often plugins use WordPress built-in capabilities, like ‘edit_posts’ or ‘manage_options’, which you can not revoke as it is needed for other purpose or can not simply grant as it’s too critical. Different admin menu manipulation plugins may help in this case. Look at the ‘Admin menu editor’ or ‘User Role Editor Pro” admin menu access add-on.Forum: Plugins
In reply to: [User Role Editor] Great, but you cannot edit Admin usersCapabilities granted through the role are shown at the User’s capabilities page as disabled by design. You can not revoke them at the user level.
If you need user with the less permissions you have to grant him another role, not ‘administrator’ one.If some plugin uses ‘administrator’ role directly, it should not. It should use user capability, not a role when define its admin menu.
WordPress built-in current_user_can() function is made for work with capabilities, not the roles.Forum: Plugins
In reply to: [User Role Editor] Add sub group to custom permission.Hi,
Yes, it’s possible. Use this code sample as a starting point. It will show existing capabilities ‘team_cap1’, ‘team_cap2’, ‘team_cap3’ under group ‘Custom Capabilities->Team’.
add_filter( 'ure_capabilities_groups_tree', 'add_team_group', 10, 1 ); function add_team_group( $groups ) { $groups['team'] = array('caption'=>esc_html__('Team', 'user-role-editor'), 'parent'=>'custom', 'level'=>2); return $groups; } add_filter( 'ure_custom_capability_groups', 'get_team_caps_groups', 10, 2 ); function get_team_caps_groups( $groups, $cap_id ) { $team_caps = array( 'team_cap1', 'team_cap2', 'team_cap3' ); if ( in_array( $cap_id, $team_caps ) ) { $groups[] = 'custom'; $groups[] = 'team'; } return $groups; }Use own translation domain value in esc_html__() function instead of ‘user-role-editor’.
- This reply was modified 5 years, 10 months ago by Vladimir Garagulya.
Forum: Plugins
In reply to: [User Role Editor] Editor with access to backend menuHi Eva,
‘edit_theme_options’ capability protects all items under ‘Appearance’ menu, including the ‘Menus’ one.
Forum: Plugins
In reply to: [User Role Editor] Notifications when assigning/changing user role?Hi,
Currently URE does not include such functionality.
Forum: Plugins
In reply to: [User Role Editor] User can not upload files on lisintgHi,
Not registered user can not have any user capability by definition. It’s better to ask support from the ‘Listing plugin’ developer.
Forum: Plugins
In reply to: [User Role Editor] User delete/edit permission not working for custom roleWooCommerce works this way by default. Workaround is documented here.
Forum: Plugins
In reply to: [Plugins Garbage Collector (Database Cleanup)] Entries to Delete – unsureHi,
These db tables belong to “TI WooCommerce Wishlist” plugin. If you don’t use this plugin no more, then you can be sure to delete them from the database.
- This reply was modified 5 years, 10 months ago by Vladimir Garagulya.
From other side if you change the selection from ‘administrator’ to ‘contributor’ Word Ballon will check ‘edit_posts’. Thus any user with ‘edit_posts’ capability will can use WordBalloon plugin. So there is not need to change something. Just try to select a role with lower level of permissions required.
Hi,
At Word Balloon plugin Settings page I see the option:
“Permissions of user required to use Word Balloon when posting” with the dropdown list of WordPress built-in roles:
‘administrator’, ‘editor’, ‘author’, ‘contributor’.
This is a reason, why user with other role, who can add new posts can not use Word Balloon – no permissions. Word Balloon does not support custom roles. More, it does not support multiple roles.
Currently it realizes this logic – replaces role ID saved at the plugin settings page with user capability this way:function word_balloon_capability($capability){ if('administrator' === $capability ){ return 'manage_options'; }elseif('editor' === $capability ){ return 'moderate_comments'; }elseif('author' === $capability ){ return 'edit_published_posts'; }elseif('contributor' === $capability ){ return 'edit_posts'; } return 'manage_options'; }Ask Word Balloon plugin developer to replace user roles in the dropdown list directly with corresponded capabilities. This solution will be more universal and work for those who use custom user roles.
Hi,
Thanks a lot for the detailed problem description and constructive suggestion. I will take in into account for the further plugin developemnt/enhancement.
The issue was related to the plugin with a lot (thousands) of files. Server generated the timeout error when PGC went through that plugin in a queue.
So I helped @playbasfa to isolate that plugin and add it to the skip-list as a workaround. You may contact me directly if you need a similar help.
Forum: Plugins
In reply to: [User Role Editor] User delete/edit permission not working for custom roleHi,
My test showed that shop_manager with ‘list_users’, ‘edit_users’, ‘delete_users’ capabilities’ can delete selected user with ‘customer’ role successfully. Test user was just created and did not have orders though. Does customer have orders in your case?
Try to deactivate all plugins except WooCommerce and try under shop_manager to delete user then?Menu item “Tools->Erase personal data” is protected by virtual user capability ‘erase_others_personal_data’. WordPress maps it by default to ‘manage_network’ for multisite and ‘manage_options’ for single site installation.
Forum: Plugins
In reply to: [User Role Editor] edit_private_posts not working as expectedHi,
‘edit_posts’ is the base permission. It protects menu ‘Posts’, allows to see the posts lists and edit own not published posts. All the rest ‘edit_’ permissions for posts are additional levels of control.
If you can edit_posts but post is published, WP will check if you can ‘edit_published_posts’.
If you can edit_posts but post was created by other user, WP will check if you can ‘edit_others_posts’.
If you can edit_posts but post is private, WP will check if you can ‘edit_private_posts’.The most of times custom post type are defined with the default capability type ‘post’, and thus WP checks for all such CPT the same list of permissions as for WP built-in posts: edit_posts, edit_others_posts, etc. Read more about permissions for custom post types here.
Forum: Plugins
In reply to: [User Role Editor] only reply CommentsHi,
Thanks for the good feedback.
‘Comments’ admin menu is protected by ‘edit_posts’.Only user which can edit post, can moderate/reply to the comments to that post at the WP back-end. So you have to grant to such user at least ‘edit_posts’, ‘edit_others_posts’.
Workaround, if you don’t wish such user edit posts, to block for him the ‘Posts’ admin menu. You may use this sample as a starting point.
Or look at the “Admin menu access” add-on included into User Role Editor Pro.