Semicolon
Semicolon

Reputation: 1914

SilverStripe enable users to edit SiteConfig

I'm trying to enable users to be able to edit open SiteConfig section and edit the fields.

I've got the following SiteConfig extension (inside a module)

class SiteConfigTweaks extends DataExtension {

  public function canView($member = null) {
      return true;
  }

  public function canEdit($member = null) {
      return true;
  }

  public function canCreate($member = null) {
      return true;
  }

Extension declared in .yml file:

SiteConfig:
  extensions:
    - SiteConfigTweaks

The SiteConfigTweaks extension is properly extended and tested (other functions in this class work fine). But the permissions settings (canView etc) seem to be ineffective.

Upvotes: 1

Views: 45

Answers (1)

jjjjjjjjjjjjjjjjjjjj
jjjjjjjjjjjjjjjjjjjj

Reputation: 3118

In the CMS under Security > Groups > Content Authors > Permissions, the "Manage site configuration" permission might be un-ticked, and this might take precedence over the canX() functions.

Upvotes: 2

Related Questions