Skip Navigation

[Resolved] URGENT! Capabilities required to edit custom code snippets

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by Ben 5 years, 7 months ago.

Assisted by: Nigel.

Author
Posts
#1220448

Ben

What are the WordPress capabilities needed for a user to be able to modify or edit custom code snippets?

#1220457

Ben

It seems to be "delete_users". Can anyone confirm?

Is there any documentation surrounding capabilities within Toolset or an explanation for this?

#1220620

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Ben

I've put a question in with the devs, I'll update you.

#1220632

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Ben

There isn't a capability specific to code snippets, access to the whole Toolset settings requires the 'manage_options' capability. Of the standard roles, only administrators have this capability.

#1220808

Ben

Hello Nigel,

Thank you very much for looking into this for me, it's appreciated!

When I create a custom user role and enable "manage_options", this always give an error when trying to update or modify custom code snippets. It's only when "delete_users" is enabled that this seems possible.

I am guessing that this shouldn't be the case then?

#1220888

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Ben

I'm not seeing the same.

If I go to Toolset > Access Control > Custom Roles and enable advanced mode so that I can modify the built-in roles, then edit the author and grant them manage_options capability that is all that is required for them to be able to add/edit code snippets.

They don't have the delete_users capability.

I also created a custom role, initially copying over the author permissions and then updating them to include manage_options, and I got the same result.

#1221101

Ben

Hello Nigel,

I'm not sure why this is this case on my installation then.

I can enable every capability apart from delete_users and it doesn't work. Maybe something to do with the config here somewhere.

I will have a test and see if I can figure it out.

#1221547

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, well let me know what you find.

If needs be I can create a sandbox site to demonstrate what I've described in my testing, but that won't help you identify what's different on your end.

#1223006

Ben

Hello Nigel,

Thank you for your help with this.

I'm not going to have enough time to set this up and test it for a while, so i'll close it for now and open a new ticket if I find the same issue in the future.

Apologies I can't help more on this occasion.

#1225337

Ben