panel.site.update

Permission to update the site settings

You can block site option updates. This will switch all form fields to readonly fields and hide the save button.

Target Data

ui

$this->target()->site()

action

$this->target()->site()
$this->target()->data()

Example

<?php

// site/roles/editor.php
return [
  'name'        => 'Editor',
  'default'     => false,
  'permissions' => [
    '*'                 => true,
    'panel.site.update' => false
  ]
];

Allow updates for a specific language

<?php

// site/roles/editor.php
return [
  'name'        => 'German Editor',
  'default'     => false,
  'permissions' => [
    '*'                 => true,
    'panel.site.update' => function() {
      return $this->language()->code() === 'de';
    }
  ]
];