Forum Replies Created
-
AuthorPosts
-
VladimirKeymaster
Hi Shweta,
I work on the update. “Grant Roles” window will have 2 parts: Primary role and Other roles.
Custom filter will allow to hide “Primary role” section.I suppose to publish the update next week.
VladimirKeymasterHi,
If theme use WordPress built-in notices API then its possible to hide such notices for role using this recipe.
Unfortunately some developers show notification at wp-admin using own code and do not differentiate to whom show those notification but to whom do not show.
03/05/2017 at 04:12 in reply to: Unwanted dashboard redirect when 'settings-updated' is present #3662VladimirKeymasterHi Frederick,
Can you provide me a copy of this oxfam plugin for testing and selection an appropriate solution.
It’s possible to add its URL argument directly to URE Pro allowed list of URL parameters for this plugin (if this plugin quite popular) or, in other case, just setup custom filter which will add such parameter at your installation. I will show you a code sample then.03/05/2017 at 04:05 in reply to: Custom User Role Admin Menu Permission can't access to second layer #3661VladimirKeymasterHi,
Thanks for the feedback.
Do you use “Block not selected” option at “Admin menu” for this role? Can you show a full screenshot of “Admin menu” settings?
Does any menu item with a link started from ‘user-edit.php’ exist at your not restricted admin menu?
If ‘Edit’ link differs from one existed at admin menu by URL arguments, then URE can redirect user from such URL as from prohibited one (count it as not selected).
VladimirKeymasterHi Oli,
‘SP News and Widget’ plugin registers ‘News’ custom post type with the same user capabilities set as WP does for built-in posts. Look at this screenshot.
So if user can edit/create posts he should have a full access for work with news too.User Role Editor does not show capabilities for custom post type if it uses capabilities from WordPress built-in post type. That’s why you see 0 there. Capabilities are available under ‘Posts’ group in this case.
VladimirKeymasterWP does not have built-in ‘news’ custom post type. What plugin or theme creates ‘News’ menu at your site? I need that code copy to look at it and try to help you.
VladimirKeymasterHi Oli,
Some custom post types are defined a way to use WordPress built-in ‘edit_posts’ capabilities set. You can check this using Admin menu access add-on. Activate add-on, then open Users->User Role Editor, select Administrator role and open ‘Admin menu’. Look what capabilities are used for News menu. I suppose that it is an ‘edit_posts’.
02/05/2017 at 01:46 in reply to: Unwanted dashboard redirect when 'settings-updated' is present #3650VladimirKeymasterHi Frederick,
Thanks for the feedback. Yes, it’s possible to at URL parameters into “allowed” list.
Send me a full URL (without domain) in order I know exactly what WooCommerce option you change.VladimirKeymasterOK.
Excuse for the typo: ‘lose’ except of ‘use’ of course – edited above.VladimirKeymasterHi Shweta,
Yes, correct. ‘Grant Roles’ replaces all roles granted to user including a primary role.
I will look how to achieve this: using custom filter for example or something else.VladimirKeymasterNon-admin user still can use WordPress’s “Change role to”. So if there is no urgent need to grant users multiple role you can use this recipe as it is. In order to grant multiple roles – wait a next update of URE and URE Pro.
VladimirKeymasterHi,
It’s possible to hide ‘Edit’ link under every user row at users.php and block access to user profile editing adding this code to functions.php of active theme:add_filter('user_row_actions', 'custom_user_row_actions', 10, 2); function custom_user_row_actions($actions, $user) { if (current_user_can('user-manager')) { unset($actions['edit']); } return $actions; } add_action('admin_head', 'custom_block_user_profile', 101); function custom_block_user_profile() { $url = strtolower($_SERVER['REQUEST_URI']); if (strpos($url, 'user-edit.php')===false) { return; } if (!current_user_can('user-manager')) { return; } $url = admin_url() .'/users.php'; if (headers_sent()) { ?> <script> document.location.href = '<?php echo $url; ?>'; </script> <?php die; } else { wp_redirect($url); } }
So it seems that task was resolved as users.php has a “Grant Roles” button. But I discovered a problem here with your help. Thanks. User without ‘ure_manage_options’ capability can not use “Grant Roles” button. He will get “Not enough permissions” error message on a try to change user’s roles. It’s really wrong.
So I have to update base version of ‘User Role Editor’ to fix this issue. Let’s wait a next update – about a week.
26/04/2017 at 11:35 in reply to: Limit user to changing a single page & add events through The Event Calendar #3634VladimirKeymasterYou can insert your version of a code into active theme’s functions.php file.
26/04/2017 at 04:54 in reply to: Limit user to changing a single page & add events through The Event Calendar #3632VladimirKeymasterThis filter offer a workaround especially for similar cases:
Exclude you events custom post type from the edit restrictions using this filter.
VladimirKeymasterHi Michi,
SmartSlider added these custom user capabilities:
smartslider
smartslider_config
smartslider_delete
smartslider_editSo I think you need to grant to your user at least: smartslider, smartslider_edit, smartslider_delete user capabilities to give him access for editing sliders.
-
AuthorPosts