diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-10-19 17:13:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 17:13:15 +0200 |
commit | be892d2e283a0a939434650a0c9933308a2cc6bb (patch) | |
tree | 85f1ac03f25e55fec258749d67b35b6a2b97db83 /apps/theming/lib/ThemingDefaults.php | |
parent | f116c8703982d6cd8407ca43f19e77b116041658 (diff) | |
parent | d89da9b898ae25d7aadde7cf22063a487e7a8ace (diff) | |
download | nextcloud-server-be892d2e283a0a939434650a0c9933308a2cc6bb.tar.gz nextcloud-server-be892d2e283a0a939434650a0c9933308a2cc6bb.zip |
Merge pull request #34576 from nextcloud/fix/user-theming-admin-overrride
Add admin user customization kill switch
Diffstat (limited to 'apps/theming/lib/ThemingDefaults.php')
-rw-r--r-- | apps/theming/lib/ThemingDefaults.php | 11 |
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'; + } } |