Forum Replies Created
-
AuthorPosts
-
VladimirKeymaster
Hi,
Currently, URE does not include no such functionality.
If you block some left side admin menu item, URE should block automatically the item with the same URL at the top admin menu bar.
I plan to add ability to select what top admin menu bar item to block to one of the future versions.
VladimirKeymasterHi,
I confirm this. Simple banner plugin does not think that role may edited manually, and applies the logic: if role has ‘manage_simple_banner’ capability, thus it was granted automatically by SB plugin itself, then if role is not included into the list of roles allowed to work with SB (Pro feature), then automatically revoke ‘manage_simple_banner’ and ‘manage_options’ user capability from such role:
// Add permissions for other roles foreach (get_editable_roles() as $role_name => $role_info) { if ( $role_name !== 'administrator') { if (in_array($role_name, explode(",", $permissions_array))) { $add_role = get_role( $role_name ); $add_role->add_cap( $manage_simple_banner ); $add_role->add_cap( $manage_options ); } else { $remove_role = get_role( $role_name ); // only remove capabilities if they were previously added if ($remove_role->has_cap( $manage_simple_banner )){ $remove_role->remove_cap( $manage_simple_banner ); $remove_role->remove_cap( $manage_options ); } } } }
VladimirKeymasterHi,
1. I can not use “DELETE” as it does a real “Reset”:
– removes all roles;
– executes original code from WordPress setup, which creates from the scratch 5 WordPress built-in user roles: administrator, editor, author, contributor, subscriber. That is “reset” means in this case – return WordPress user roles to its initial state.So URE’s “reset” here not only deletes roles added by other plugins, but removes any changes made by plugins or users to WordPress built-in roles.
3. I fixed the link to external article too. Thanks for pointing me that.
VladimirKeymasterYou need change nothing. It will work with the same license key but the new URL.
VladimirKeymasterYou don’t need to add these snippets to CS plugin. I took them from its source code to show you the possibility to change ‘manage_options’ to any other user capability.
If do not change that, just grant ‘manage_options’ capability to shop manager. It will get access to the ‘Snippets’ admin menu. Also it will get access to all other admin menu items, protected by ‘manage_options’, like ‘Settings’ for example. You can block them using “Admin menu access” add-on included into URE Pro.VladimirKeymasterHi,
1. I clarify the meaning of ‘Reset’ action in this case with 2 detailed subsequent text warnings. This is a reason, why I will not change the thing which is 8+ years old.
2. I accept and will realize this suggestion. Thank you.
3. I fixed the image links in the mentioned article. Thanks again.VladimirKeymasterHi,
Code Snippets plugin uses ‘manage_options’ user capability and ‘manage_network_options’ for the WordPress multisite.
It allows to replace default user capability via custom filters:
code_snippets_cap
:/** * Retrieve the name of the capability required to manage sub-site snippets * * @return string */ public function get_cap_name() { return apply_filters( 'code_snippets_cap', 'manage_options' ); }
and
code_snippets_network_cap
:/** * Retrieve the name of the capability required to manage network snippets * * @return string */ public function get_network_cap_name() { return apply_filters( 'code_snippets_network_cap', 'manage_network_options' ); }
Take into account that user who can execute PHP code at the site server can get superadmin access in a minute. You should trust to such person.
VladimirKeymasterHi,
Send a link to plugin at wordpress.org/plugins in order we talk about the same plugin.
VladimirKeymasterHi,
Quick fix for WooCommerce roles is to deactivate and activate back WooCommerce plugin. WC restores its roles automatically on activation.
VladimirKeymasterTo @aakraak:
Grant subscriber role to some user and login as that user or switch to it using “User Switching plugin.
VladimirKeymasterHi,
Currently there is no such workaround. Restriction is applied to all existing taxonomies at once.
I will think how to exclude selected taxonomies from the restriction using custom filter and apply this to one of the future versions.VladimirKeymasterIt’s by design. WordPress multi-site has superadmin, for which WordPress does not check any user capability at all. URE does not add any capability to single site ‘administrator’ role for this reason.
You can go to “Network admin->Users->User Role Editor”, select “Administrator” role, add ‘create_%’ capabilities to it, save changes. It was made for the main site. Then click ‘Update Network’. This way all roles from main site will be replicated to all other subsite.
You can replicate only administrator role to other subsites – if open URE directly from the main site, select “Administrator” role, turn ON the “Apply to All sites” checkbox then click “Update”.
25/03/2021 at 14:32 in reply to: Event Calendar Pro Access for Role but nothing showing in Drafts or Trash #7439VladimirKeymasterErik,
You use custom code to retrieve posts via WordPress API function get_posts() and does not include post_status argument to the arguments list. Function get_posts() uses ‘publish’ value for this argument as a default one in this case, line #2133:
So if you wish to make available records with ‘draft’ status too, you have to execute the separate query with ‘post_status’=>’draft’ argument added and concatenate the result of both queries.
VladimirKeymasterHi,
It seems as expected behavior. Restriction by category ID is global for all taxonomies. So when you all to see at backend and edit only posts with category (taxonomy) ID=3, you automatically prohibit editing posts with any other taxonomy ID. Thus use can not add to the post new tags/taxonomies.
As about 0 items at the tags or categories page, it is a result of URE’s internal caching. But if you limit user to edit post only with the restricted list of existing taxonomies – you should not allow him to edit them. You have to delegate this function to another user according to my logic. So taxonomy editing pages should not be available to a user restricted such way.
25/03/2021 at 12:31 in reply to: Event Calendar Pro Access for Role but nothing showing in Drafts or Trash #7437VladimirKeymasterHi,
I have made own tests. I can not repeat described issue with post and/or events restricted by built-in categories. If it’s possible to look at your site with admin privileges send URL and user credentials to my support email address.
-
AuthorPosts