Jump to:

23368 Posts in 18143 Topics by 2863 members

General Questions

SilverStripe Forums » General Questions » Adding Security Access on SiteConfig

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

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

Page: 1
Go to End
Author Topic: 1102 Views
  • edk
    Avatar
    Community Member
    39 Posts

    Adding Security Access on SiteConfig Link to this post

    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

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: Adding Security Access on SiteConfig Link to this post

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

    1102 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.