I have built a site with several presets where each preset has a number of features.

I would like to restrict the presets available for selection by role of the user. is there a way for me to do this?

Thanks.

Comments

Grayside’s picture

There is no configurable approach I am aware of, but if you create a module and set the weight to 2, you can use hook_form_alter() to remove individual options you do not want to share. You will have to do your security checks in the hook_form_alter() code, as you cannot attach access controls to individual radio buttons.

$form['spaces_preset']['spaces_preset_og']['#options']

jmiccolis’s picture

Status: Active » Closed (won't fix)

Grayside's advice is right on. We won't be adding this functionality to spaces itself, but it's quite possible to do this in a small custom module that implements hook_form_alter().