Skip Navigation

[Résolu] Limit the roles a user can promote

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Marqué : 

This topic contains 10 réponses, has 2 voix.

Last updated by OliverJ8211 Il y a 5 années et 8 mois.

Assigned support staff: Shane.

Auteur
Publications
#353124

I am trying to: Let a custom role "Member Manager" promote these roles "Pending Member" to "Qualified Member"

But access only gives me the option to give the "Member Manager" the ability to promote. So they can promote a "Qualified Member" to "Shop Manager" or "Editor" by mistake. I want to be able to block that so they can only promote "Pending Member" to "Qualified Member"

Thank You.

#353222

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Oliver,

Thank you for contacting our support forum.

Unfortunately this is not something that can be achieved by using our toolset plugins.

Our plugins do not have control over such small details on the user roles. If something like this is to be done, it would require some amount of custom work.

Such custom work is out of the scope of our support forum 🙁

What I recommend that you do is to get in touch with one of our certified partners who specializes in custom development.

You can get in touch with them by going to the link below.
https://toolset.com/consultant/

Please let me now if this helps.

Thanks,
Shane

#353285

Really? So when developing a plugin called Access nobody thought to not give people the ability to give too much access to the site. Excuse my sarcastic remark but I couldn't resist. I'll post my custom coded solution here once it's done.

#353288

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Oliver,

The reasoning behind this is that something like this is not supported by the wordpress API.

If you take a look at the roles documentation below you will notice that they do not have a function that supports giving capabilities to roles to adjust another users roles for your specific use case.
https://codex.wordpress.org/Roles_and_Capabilities

User roles are also defined in levels. At level 8 or above a user gains access to manage another user's role and they are able to see all the roles below them. Level 8 and above are essentially administrators.

Our Access plugin is bounded by what the wordpress API provides. To go outside of the wordpress API would require a hacked solution which we cannot provide 🙁

Please let me know if I was able to adequately explain this to you.

Thanks,
Shane

#353290

Yes, but based on https://codex.wordpress.org/Roles_and_Capabilities the role member manager that I set up should only be able to govern subscribers, guests and my 2 custom roles but it can make roles above it's level of 3 which it should not be able to do.

Either way I'm going to start on a custom solution.

#353296

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Oliver,

I believe only admins of level 8 or above can edit user roles. So in order for the user to be able to manage roles of other users then they will need to be at level 8 or above.

Thanks,
Shane

#353301

I just told you that's how it should be but the access plugin gives all or nothing. Only limiting the making of an admin.

But if you say the access plugin works that way, please show me how?

#353302

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Screen Shot 2015-12-11 at 5.06.20 PM.png
Screen Shot 2015-12-11 at 5.06.24 PM.png

Hi Oliver,

If you go to our access plugin and scroll down. Here you can create your custom user roles.

After creating the role you are then given the open to "Change Level" once you click that you will then be given the option to adjust the user role level from 0-10. See screenshot.

Please let me know if this helps.

Thanks,
Shane

#353305

I have the "Member Manager" set at 3 but he can promote to roles above 3. So no this does not help. But Thank You.

#353307

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Oliver,

It seems I misinterpreted your response. I must apologize for this 🙁

In this case as mentioned it would take some custom coding to restrict which roles the user can promote or not promote.

Thanks,
Shane

#356233

Not technically resolved but you can close.