Forum Replies Created
-
AuthorPosts
-
Vladimir
Keymaster‘unfiltered_html’ capability is located at the ‘Deprecated’ group when you under WP multisite. Turn ON ‘Show deprecated capabilities’ option at the top of ‘Users->User Role Editor’ page in order to see ‘Deprecated’ capabilities.
Vladimir
KeymasterHi,
‘unfiltered_html’ is deprecated (do not allowed) for WP multisite by default. You can turn ON the ‘Enable “unfiltered_html” capability’ option at the ‘Network admin->Settings->User Role Editor->Multisite’ if you wish to use it the same way as for WordPress single site.
10/10/2020 at 11:59 in reply to: Restrict content in frontend for everyone if capability is not active #7083Vladimir
KeymasterHi,
In general Content view restrictions add-on may help. It requires although that user with ‘ure_view_posts_access’ capability and permission to edit all those posts set manually, which roles are allowed to their content.
Take into account that, if user can edit the post, he automatically can view it.
You can not set view permission to the full post type at once currently. I think that it would enhance content view restrictions add-on usability and plan to add it to one of the future versions.
08/10/2020 at 13:54 in reply to: Remove Select Option Change Member Type in User List to one role #7081Vladimir
KeymasterFortunately ‘buddypress-member-types-pro’ plugin does not show it’s ‘Select member type’ drop-down list in case member types list is empty. So we can use this to hide it:
add_filter( 'bp_get_member_types', 'remove_bpmtp_select_member_type', 100 ); function remove_bpmtp_select_member_type( $types ) { $user = wp_get_current_user(); if ( is_array($user->roles ) && in_array('users_administrator', $user->roles ) ) { $types = array(); } return $types; }
Just replace ‘users_administrator’ at the code above with your own role ID and place this code to your active theme functions.php file or set it as a Must Use plugin.
Vladimir
KeymasterAdmin menu access add-on included to URE Pro blocks URLs linked to the blocked menu items, not simply hides them.
It’s not possible to achieve via granting/revoking user capabilities, what free version allows.
Finally all changes/extensions which Pro version brings to WordPress are realized with usage of some filters and actions.You may use the code described here as a starting point.
Vladimir
KeymasterI see only one way, how you can use URE Pro to resolve this task – try the “Admin menu access” add-on.
W3 Total Cache plugin protects all its admin menu items with ‘manage_options’ user capability. So you can grant ‘manage_options’ to a role and block all unneeded menu items selecting related checkboxes. I recommend to start from the “Block Selected” model, as ‘Block not selected’ will require more complex tuning.
For W3TC leave unselected(unchecked) only ‘Perfomance’ and ‘Dashboard’ menu items. This will leave to a role access to the dashboard page where different clear cache buttons will be available. URE Pro will block access to all other (selected) menu items and linked URLs.
Vladimir
KeymasterGood point! Thanks for the suggestion. I will include it to the development plan for the next month.
07/10/2020 at 07:20 in reply to: Remove Select Option Change Member Type in User List to one role #7074Vladimir
KeymasterThanks for letting me know. Your post was automatically got status ‘Pending’ due to 3 links inside and I missed it. I published it now.
I need access to the membership plugin to look how to hide its “Select member type” drop-down menu. Is your membership plugin available at the wordpress.org/plugins? Send to support[at-sign]role-edito.com a direct link to it (at wordpress.org or to your own copy via DropBox or similar sevice).
Vladimir
KeymasterHi,
Replace line 628 with this version:
if ( !empty( $muPluginDir ) ) { $cachedResult = ( strpos( $pluginPath, $muPluginDir ) === 0 ); }
I will include this change into the next update of URE Pro.
Vladimir
KeymasterHi,
>>Can USER A login to SITE B?
Yes. WordPress multisite has the single users database table. User logins to the network, not to the site of the network. Then WordPress looks, what role(s) user have at the site, which he opens. Every site has own permissions. So user A will not have any permissions at the site B and may get probably ‘You do not have enough permissions’ error message when try to open wp-admin at the site B.Vladimir
KeymasterRoles & Capabilities list and user permissions are fully independent between subsites. So problem with access is related to the main site only in the part of the replication roles from the main site. You should get exact copy of permissions you grant to a roles at the main site after replication.
Try to grant ‘edit_posts’ in addition. Just in case it will help.
If you turned ‘ON’ the “Activate “Create” capability for posts/pages/custom post types” option at URE’s Settings then you have to grant ‘create_prosforas’ to a role in order it can add new ‘prosfora’.
Another assumption,
do you have ‘Activate user access management to editing selected posts, pages, custom post types’ option turned ON at URE’s Settings? If Yes, there a conflict is possible, in case, if ‘posfora’ CPT is defined with own custom user capabilities and developer check some of those capabilities directly in the code, e.g. current_user_can(‘cst_edit_prosforas’).
In this case URE can not help with redefining CPT capabilities. It works correctly only in case code takes capability to check directly from CPT definition, like
$cpt->caps['edit_posts']
(just for example) not ‘cst_edit_prosforas’.Vladimir
KeymasterURE shows “Delete Capability” button only if there are capabilities available for deletion – not assigned to any role, except ‘administrator’ one.
So, review your roles, revoke unneeded capabilities from them. “Delete Capabilities” button will become available again.Vladimir
KeymasterYes, I confirm the result of your experiment.
How to sync user roles between all the sites of a mulitisite WordPress
Vladimir
KeymasterHi,
WordPress multisite grants access to users on the per site basis. Every subsite has its own user roles list and stores separately which roles are granted to which user.
Thus, user A will not have ‘Business Manager’ role access at the subsite B until you directly grant him “Business Manager” role at the subsite B.Vladimir
KeymasterYes,
just replace array elements with your own data. If you have pages with ID: 3, 15, 7, then code line will be:$args[‘include’] = array(3, 15, 7);
Yes, input parent page(s) ID to the correspondent input field at user profile or for a role. URE Pro will extract and add to restrictions all linked child pages ID automatically.
-
AuthorPosts