Forum Replies Created
-
AuthorPosts
-
29/07/2016 at 07:14 in reply to: Why URE restricted role when it is clearly given permission (on Submenu)? #2593
Vladimir
KeymasterI do not see the reason for that. I will make my own tests and try to repeat this.
Vladimir
KeymasterGreg,
BackupBuddy uses ‘activate_plugins’ capability to protect all its menu items. So when you revoke ‘activate_plugins’ from ‘Shop Manager’ role it will not see ‘BackupBuddy’ menu.
You may add ‘manage_options’ capability to ‘Shop Manager’ role. It will see ‘WitFTP’ menu then. But it will see ‘Settings’ and some other menu items protected by the same ‘manage_options’ capability. You may block them for ‘Shop Manager’ role using ‘Admin menu access’ module:
Vladimir
KeymasterHi Greg,
Permission to activate plugin does not give to a user a permission to use it.
If ‘activate/deactivate’ plugin is not critical function for your shop manager (you may activate those plugins once as administrator) you may do not give him ‘activate_plugins’ capability at all.WitFTP protectes its menu item by ‘manage_options’ user capability.
You may use ‘Admin menu access’ add-on
https://www.role-editor.com/block-admin-menu-items
in order to block extra menu items which will become available to editor tole after you add to it the ‘manage_options’ capability.It seems that shop manager has enough permissions to access BackupBuddy. I don’t have it on hands to check what capabilities it requires. I may check that if you send plugin copy to support email. I use such plugins for testing purpose and locally only.
28/07/2016 at 06:15 in reply to: Why URE restricted role when it is clearly given permission (on Submenu)? #2587Vladimir
KeymasterWordPress uses just ‘edit_{post_type_name}’ by default. ‘create_{post_type_name}’ is added as additional restriction when you activate “edit restrictions” add-on at User Role Editor Pro settings. So restricted user without ‘create_’ capability can not add new posts.
28/07/2016 at 03:24 in reply to: Why URE restricted role when it is clearly given permission (on Submenu)? #2585Vladimir
KeymasterThat’s good that you found a workaround.
I did not make any tests myself yet. So, just my assumptions:
Did you define custom post type with 1st uppercase letter, like ‘News’ instead of ‘news’?
Some mess may take place with capability ID: ‘create_newss’ vs ‘create_Newss’. Last one could be not converted or converted to the lowercase somewhere.27/07/2016 at 14:36 in reply to: Why URE restricted role when it is clearly given permission (on Submenu)? #2582Vladimir
KeymasterI suppose that the 1st thing you need to re-check is the custom post type capabilities:
How did you define ‘news’ custom post type capabilities?Generally if you define ‘video’ custom post type for example, capabilities will be ‘create_videos’, ‘edit_videos’.
What will be for ‘news’ custom post type. Are there ‘create_newss’, ‘edit_newss’?
Then ‘create_news’ in a role will not work as ‘create_newss’ will be required.2nd, did you set any restrictions with “Admin Menu Access” add-on for this role?
Vladimir
KeymasterNo problem.
The only custom filter which is currently included to URE’s code related to the edit restrictions items at user level is ‘ure_post_edit_access_authors_list’.
$value = apply_filters('ure_post_edit_access_authors_list', $value);
I will add more custom filters with a next version possibly.
You may use a general WordPress ‘get_user_metadata’ filter from get_meta_data() function:
$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single );
Here:
$object_id : $current_user->ID,
$meta_key : $wpdb->prefix .’ure_categories_list’In both cases you should check if you set the category for this user or not yourself inside those filters.
23/07/2016 at 02:17 in reply to: Unable to Restrict Access within WP Admin on One Specific Site #2575Vladimir
Keymaster“Admin Menu Editor” plays on the same field as the User Role Editor Pro “Admin menu access” add-on. They try to modify the same menu data structure simultaneously. So the conflict is very expected. In case you need extended menu modification functionality offered by Admin Menu Editor look at the Admin Menu Editor Pro and do not use “Admin menu access” add-on from URE. Admin Menu Editor Pro allows to assign to menu items custom user capabilities so there will be no need to block them, just add/revoke those capabilities to/from the roles.
Vladimir
KeymasterHi,
Does user can edit ‘Zees’ page if you assign him a ‘Zees’ role as a primary one?
I mean that if ‘Zees’ page was created by other user, current user should have ‘edit_others_pages’ capability in order he can edit it.Vladimir
Keymaster“Editing mode” – it could be some issue with cookie. Try the same using different browsers for different users.
Vladimir
KeymasterWhat area for extra capabilities do you mean?
In order contributor can add a feature image he should have the ‘upload_files’ user capability. This automatically gives him access to the Media Library.
It’s possible to block for the contributor role the access to the “Media” menu with “Admin menu access” add-on.
But if you fully block “Media” menu (including “Add new”) user will can not add new image. It will can just select a featured image from the existing images.
I offer do not block “Media” menu for contributor. It’s possible to restrict him to see just his own images there. Activate “Edit posts restrictions” add-on. Do not forget to add ‘create_posts’ capability to ‘contributor’ role in this case.
Open “Posts Edit” dialog for contributor role and select “Allow”, “Own data only”. This setting will hide from the Media Library images uploaded by other users.21/07/2016 at 16:18 in reply to: 4.26.1 breaks "Select a category" with Download Monitor plugin #2567Vladimir
KeymasterGood news! Thanks for the help with testing.
21/07/2016 at 06:56 in reply to: 4.26.1 breaks "Select a category" with Download Monitor plugin #2564Vladimir
KeymasterCould you try development version 4.26.2.b5? It’s available after login from the same Download page.
19/07/2016 at 02:58 in reply to: Give User Full Access to "Page" but restrict Post ID in "Post Type" #2563Vladimir
KeymasterIn order to exclude ‘page’ post type from the edit restriction you may use a custom ure_restrict_edit_post_type filter.
Modify example code according with your needs and add it into your active theme functions.php file or setup as a “must use” plugin.Let me know if you need further help.
18/07/2016 at 10:01 in reply to: Give User Full Access to "Page" but restrict Post ID in "Post Type" #2561Vladimir
KeymasterTo what post type post with ID=1601 really belongs: post, page or custom post type (CPT)? You need to know this to be clear what capabilities are in use for item with ID=1601: posts, pages or special for that CPT.
User should be capable to edit this CPT item before you apply edit restrictions with URE. So if item ID=1601 was created by other author, user should have ‘edit_others_pages’ for pages, ‘edit_others_posts’ for posts or CPT which uses the same capabilities as posts do, or ‘edit_others_cptname’ for that CPT, e.g. ‘edit_others_videos’ for videos CPT.
You may look at ‘Admin Menu’ at this CPT menu for administrator role to be sure what capabilities CPT uses.
“Look at Roles” is related to the “What to do” (restriction type) field only: prohibit or allow or look 1st not empty value from roles assigned to this user.
So if you need to add a special restriction just for this user make it at this user profile without reference to the roles, assigned to this user.
You may set edit restrictions at the role level and use them for the group of users.
-
AuthorPosts