Allowing Users to Access Certain System Settings

hearty fare

User Access to System Settings

System Settings are useful global variables. But you don't always want to give your Manager users access to all of the critical System Settings.

bonflash asked...

I want to make some parts of the page layout info (e.g., a phone number, an address, etc. in the site header) editable by site users, but not burden them with templates/chunks. At the same time, giving them the full set of system settings along with the needed ones could be equally confusing and even dangerous.

So, is it possible to give a user/a group access to some of the system settings in Revo, while all the others will remain invisible to them?

The Solution

BobRay says...

I'm afraid users either have access to System Settings, or not.

One solution would be to create a form or a Custom Manager Page with the System Settings they should see and set the real System Settings from that.

You could also create a Resource with its own Template and Template Variables for each System Setting you want to give them access to. Then a plugin could set the System Settings when the Resource is saved.

You might look at Mark Hamstra's ClientConfig extra. I'm not sure if it will do what you want or not.

What's the Story?

ClientConfig SettingsSince, as BobRay said, you can't limit a user's access to only parts of the System Settings, some other method will need to be used. The ClientConfig add-on turned out to be bonflash's solution.

ClientConfig uses a CMP to provide a way for users to edit pseudo-settings that are stored in their own table. A plugin adds the settings to the $modx->config[] array, as well as creating placeholders using '+' as the placeholder prefix, so that [[++setting_name]] will output the pseudo-settings as if they were real System Settings.

An Admin screen allows Administrator users to create and organize new settings.

In the case of the illustration, the setting would be accessible as a placeholder [[++marketing_vp_phone]] or in snippet code: