Skip Navigation

[Resolved] A small flaw with Custom role of Toolset access control

This support ticket is created 5 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#1232139

Now I am building a multisite with Toolset, and I would like to custom role with Toolset control, but I met a small issue, when a user was created by a site, the user was "no role for this site" for other sites, as a user of multisites, this user has right to read contents from other sites, because I can restrict any content for specific user with a reminder content template, but any content templates can be specify for roles which have a role in WordPress, for "no role for this site", I cannot assign it with a content template, by default, will show them a default "page no found". do you guys consider set a whitelist and blacklist for access control plugin? it should be very easy to avoid this kind of embarrassment, By the way, could you please give a piece of code for this situation now? Thank you!

#1232593

Hi Jeffrey,

Thank you for waiting.

I performed some tests and noticed that the way WordPress handles the "No role for this site" role, all capabilities are removed from that user and he/she is practically deactivated.
( ref: hidden link )

For this reason, if your goal is to have a user role with a minimum capability or rights, which can still be assigned a content template, you can create a new custom role (instead of "No role for this site") and fine-tune it as needed.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1233117

Hi Waqar,
Thank you so much for the reply, you mean I need to create a user role with capability as level 0 and assign a content template, so when users are "no role for this role", users will see the content template I have assigned? do I need to user the same slug as 'no role for this site'? do I need to use the same capability as that role? where can I see the capability of that role? Thank you so much!

#1233636

Can anyone help me with this? Thanks!

#1233686

Hi Jeffrey,

Thanks for writing back and sorry about the delay, as we had an unusually busy queue, during the weekend.

To further clarify what I shared earlier, for your requirement you should not leave any user to the state "no role for this role".

As you noted, when a new user is added to a single site in the network with a particular role, that role is not automatically assigned to the other sites in the network.

For this, you can either manually add a custom created a role to that user from each site's admin area or use third-party plugins which can keep the user roles in sync across all sites.

- Multisite User Sync: https://wordpress.org/plugins/multisite-user-sync/

- Multisite User Management: https://wordpress.org/plugins/multisite-user-management/

- User Role Editor (Pro version): https://wordpress.org/plugins/user-role-editor/

Note: If you'd like to see this feature out-of-the-box in the Toolset Access plugin, you can submit it as a feature request at:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

regards,
Waqar

#1236168

My issue is resolved now. Thank you!