Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Adding Security Access on SiteConfig


Go to End


2 Posts   1824 Views

Avatar
edk

Community Member, 39 Posts

18 November 2010 at 6:50pm

I am trying to find the best way to apply security access levels to the SiteConfig.

I have a SiteConfig which extends the DataObjectDecorator. In the CMS on the "Home" screen there are two additional tabs with customized Site Config details. I only want admins and and a group called Content Authors to be able to edit the data in these tabs. I don't see a way to do this via the CMS interface and didn't see any reference to security access restrictions.

Thanks,
Ed

Avatar
(deleted)

Community Member, 473 Posts

18 November 2010 at 7:44pm

You can check if the user's in a given group, then call $fields->makeFieldReadonly(fieldName); for each field if they're not.