aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/lib/ThemingDefaults.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/lib/ThemingDefaults.php')
-rw-r--r--apps/theming/lib/ThemingDefaults.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 9d5183a6504..eee44e81fda 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -220,6 +220,10 @@ class ThemingDefaults extends \OC_Defaults {
// admin-defined primary color
$defaultColor = $this->getDefaultColorPrimary();
+
+ if ($this->isUserThemingDisabled()) {
+ return $defaultColor;
+ }
// user-defined primary color
$themingBackground = '';
@@ -494,4 +498,11 @@ class ThemingDefaults extends \OC_Defaults {
public function getTextColorPrimary() {
return $this->util->invertTextColor($this->getColorPrimary()) ? '#000000' : '#ffffff';
}
+
+ /**
+ * Has the admin disabled user customization
+ */
+ public function isUserThemingDisabled(): bool {
+ return $this->config->getAppValue('theming', 'disable-user-theming', 'no') === 'yes';
+ }
}