diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2018-11-04 21:02:28 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2018-11-04 21:02:28 +0300 |
commit | b39563cda4256073b77ec7f357c9bf8f8fa8da01 (patch) | |
tree | eee7d0d87db075030b978ad28efce0129ba1129d /plugins/CoreAdminHome/SystemSettings.php | |
parent | b178978b979c5dcf20fe81a9b28034c0de4ce90e (diff) |
Show the CORS settings in the UI when enable_general_settings_admin=0 (#13660)
* Show the CORS settings in the UI when enable_general_settings_admin=0
The INI setting description does not mean to include CORS:
```ini
; By setting this option to 0, the following settings will be hidden and disabled from being set in the UI:
; - "Archiving Settings"
; - "Update settings"
; - "Email server settings"
enable_general_settings_admin = 1
```
* improve the meaning of enable_general_settings_admin = 1
* Do not allow to configure trusted hostnames if general settings are disabled
Diffstat (limited to 'plugins/CoreAdminHome/SystemSettings.php')
-rw-r--r-- | plugins/CoreAdminHome/SystemSettings.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/CoreAdminHome/SystemSettings.php b/plugins/CoreAdminHome/SystemSettings.php index 0adc00ada6..d998033337 100644 --- a/plugins/CoreAdminHome/SystemSettings.php +++ b/plugins/CoreAdminHome/SystemSettings.php @@ -28,6 +28,8 @@ class SystemSettings extends \Piwik\Settings\Plugin\SystemSettings $isWritable = Piwik::hasUserSuperUserAccess() && CoreAdminController::isGeneralSettingsAdminEnabled(); $this->trustedHostnames = $this->createTrustedHostnames(); $this->trustedHostnames->setIsWritableByCurrentUser($isWritable); + + $isWritable = Piwik::hasUserSuperUserAccess(); $this->corsDomains = $this->createCorsDomains(); $this->corsDomains->setIsWritableByCurrentUser($isWritable); } |