Forum Replies Created
-
AuthorPosts
-
Vladimir
KeymasterExcellent!
Vladimir
KeymasterHi Jake,
Thanks for this update. It would be good to know the results of your tests.
Vladimir
KeymasterQuery sample with first and last name for every user:
SELECT users.user_login, users.user_email, users.user_registered, meta1.meta_value as first_name, meta2.meta_value as last_name FROM wp_users users INNER JOIN wp_usermeta as meta1 on meta1.user_id=users.ID and meta1.meta_key='first_name' INNER JOIN wp_usermeta as meta2 on meta2.user_id=users.ID and meta2.meta_key='last_name'
Vladimir
KeymasterHi @dumagroup,
If you turn ON “Own data only” checkbox for role at “Edit Posts” then user with such role will see just his own media library items only at Media Library and his own posts/pages only at Posts/Pages list too.
So you don’t need to try code recipes from above in order to restrict users to only have access/manage their own media that they have uploaded.
Vladimir
KeymasterGive more details. What does not work in “Admin menu blocking” add-on?
The 1st thing I see in “Mark New Posts” – it adds its’ submenu item to the “Settings” menu with ‘administrator’ role ID instead of ‘manage_options’ user capability. Thus this menu item is available to the user with ‘administrator’ role only.
mark-new-posts.php:244: add_options_page(self::PLUGIN_NAME, self::PLUGIN_NAME, 'administrator', basename(__FILE__), array(&$this, 'display_options_page'));
11/09/2018 at 02:01 in reply to: MetaBoxes Available, but role cannot add content or make selections #5134Vladimir
KeymasterOK.
Redirection to dashboard issue: I suppose that you limit a role access to some admin menu items via “Admin menu blocking” add-on with “Block no selected” option. If ‘Yes’ read this section of the documentation page.
Vladimir
KeymasterYes. Use “Admin menu blocking” add-on:
https://www.role-editor.com/block-admin-menu-items
to block unneeded admin menu items which you can not hide by revoking user capabilities from a role.Vladimir
KeymasterMailchimp add-on defines own user capabilities:
– gravityforms_mailchimp;
– gravityforms_mailchimp_uninstall.These capabilities were created automatically, but not granted to ‘administrator’ role. Go to ‘Users->User Role Editor’, select ‘administrator’ role and grant them to it.
/** * Defines the capabilities needed for the Mailchimp Add-On * * @since 3.0 * @access protected * @var array $_capabilities The capabilities needed for the Add-On */ protected $_capabilities = array( 'gravityforms_mailchimp', 'gravityforms_mailchimp_uninstall' ); /** * Defines the capability needed to access the Add-On settings page. * * @since 3.0 * @access protected * @var string $_capabilities_settings_page The capability needed to access the Add-On settings page. */ protected $_capabilities_settings_page = 'gravityforms_mailchimp'; /** * Defines the capability needed to access the Add-On form settings page. * * @since 3.0 * @access protected * @var string $_capabilities_form_settings The capability needed to access the Add-On form settings page. */ protected $_capabilities_form_settings = 'gravityforms_mailchimp'; /** * Defines the capability needed to uninstall the Add-On. * * @since 3.0 * @access protected * @var string $_capabilities_uninstall The capability needed to uninstall the Add-On. */ protected $_capabilities_uninstall = 'gravityforms_mailchimp_uninstall';
Vladimir
KeymasterHi,
I suppose that Mailchimp add-on for GF detects active role editor plugin and requires some special user capability the same way, as GF itself does.
I can check that for you in case you share with me .zip of Mailchimp add-on for GF (via DropBox or similar): support [at-sign] role-editor.comVladimir
KeymasterI uploaded updated version of /user-role-editor-pro/pro/includes/classes/posts-edit-access.php file to your site.
* Update: Edit posts/pages restrictions add-on: non-public taxonomies are not included into restricted database queries. URE will build now much shorter database queries for the sites which have a lot of such taxonomies at the database. For example sites with WP SEO Premium plugin, where ‘yst_prominent_words’ taxonomy may count thousands records at wp_terms and wp_term_taxonomy db tables.
It fixed a problem. Make own tests.
Vladimir
KeymasterHi,
Your hosting provider WpEngine added as MU plugin the condition to kill automatically so called long queries (longer 16384 characters) having database productivity in a mind. This is a reason why a restricted user does not see categories list.
My own thought: It is quite good to kill some ineffective query if it takes too much time at the database server to fulfill it. But it’s not a good idea to measure query productivity at the client side just counting characters inside a query string.
Returning to the problem, query is so long due to Yoast prominent words. Yoast product saves them as taxonomies and currently you have 4108 taxonomy db records automatically created by Yoast. (Some times it seems to me that not SEO exists to enhance the Internet usability) but all around exists to work for SEO. It takes too much resources.)
I will look how to exclude Yoast related taxonomies from a queries modified by URE Pro without having to list them all by ID. I found the related discussion about problem created by prominent words taxonomy for other plugin.Vladimir
KeymasterI see a problem now.
I created backup copy of your site files and data (except wp-uploads) and installed its copy at my local development environment. When I login as a humanresources user and open the 1st post from the list for editing, I see the list of allowed categories.
But the same meta box shows empty categories list at the production site. I assume that some database error may take place at your installation. Can you look at the system logs for the PHP or MySQL error messages from your server? May be temporal setting of WP_DEBUG and WP_DEBUG_LOG to true may help to see the error message.Vladimir
KeymasterHi,
Roles are exported by User Role Editor into zipped .json file, not PDF one.
Restore corrupted role capabilities list granting them manually again. Backup role by exporting them. It will allow to restore missed role back at any moment. Monitor which action/change/update may lead to this result. Report the issue if you can repeat it. I’m ready to investigate the reasons and develop a fix if any bug or incompatibility will be discovered
Vladimir
KeymasterI can not use a new user as got message ‘Disabled’ after try to reset password. I found the older credentials you have sent me earlier and logged-in successfully.
All users with ‘Specific Page Manager’ role (except one) has edit restrictions by categories list set at the user profile. Thus URE does not allow user to create new category and restricts a list of categories available to selection at the post editor page according to that condition from a user profile.
Vladimir
KeymasterHi,
1st, check if editing for this user is not restricted by category at user and role level both.
If that will not help, then Yes, send login credentials to support [at-sign] role-editor.com
-
AuthorPosts