Skip to content
Extraits de code Groupes Projets
Valider d0a6e2d8 rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

refs #5414 make those settings readable by all users

parent 3d547e52
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -130,6 +130,7 @@ class Settings extends \Piwik\Plugin\Settings ...@@ -130,6 +130,7 @@ class Settings extends \Piwik\Plugin\Settings
$this->browsers->availableValues = array('firefox' => 'Firefox', 'chromium' => 'Chromium', 'safari' => 'safari'); $this->browsers->availableValues = array('firefox' => 'Firefox', 'chromium' => 'Chromium', 'safari' => 'safari');
$this->browsers->description = 'The value will be only displayed in the following browsers'; $this->browsers->description = 'The value will be only displayed in the following browsers';
$this->browsers->defaultValue = array('firefox', 'chromium', 'safari'); $this->browsers->defaultValue = array('firefox', 'chromium', 'safari');
$this->browsers->readableByCurrentUser = true;
$this->addSetting($this->browsers); $this->addSetting($this->browsers);
} }
...@@ -137,6 +138,7 @@ class Settings extends \Piwik\Plugin\Settings ...@@ -137,6 +138,7 @@ class Settings extends \Piwik\Plugin\Settings
private function createDescriptionSetting() private function createDescriptionSetting()
{ {
$this->description = new SystemSetting('description', 'Description for value'); $this->description = new SystemSetting('description', 'Description for value');
$this->description->readableByCurrentUser = true;
$this->description->uiControlType = static::CONTROL_TEXTAREA; $this->description->uiControlType = static::CONTROL_TEXTAREA;
$this->description->description = 'This description will be displayed next to the value'; $this->description->description = 'This description will be displayed next to the value';
$this->description->defaultValue = "This is the value: \nAnother line"; $this->description->defaultValue = "This is the value: \nAnother line";
...@@ -147,6 +149,7 @@ class Settings extends \Piwik\Plugin\Settings ...@@ -147,6 +149,7 @@ class Settings extends \Piwik\Plugin\Settings
private function createPasswordSetting() private function createPasswordSetting()
{ {
$this->password = new SystemSetting('password', 'API password'); $this->password = new SystemSetting('password', 'API password');
$this->password->readableByCurrentUser = true;
$this->password->uiControlType = static::CONTROL_PASSWORD; $this->password->uiControlType = static::CONTROL_PASSWORD;
$this->password->description = 'Password for the 3rd API where we fetch the value'; $this->password->description = 'Password for the 3rd API where we fetch the value';
$this->password->transform = function ($value) { $this->password->transform = function ($value) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter