add an option to force settings to users

This commit is contained in:
Simon Vieille
2020-09-24 14:26:25 +02:00
parent 4b6a1f2989
commit c7f9fd1b8b
10 changed files with 192 additions and 147 deletions
+2 -2
View File
@@ -67,13 +67,13 @@ class CssController extends Controller
{
$backgroundColor = $this->config->getAppValue('background-color', '#333333');
$backgroundColorTo = $this->config->getAppValue('background-color-to', $backgroundColor);
$isForced = $this->config->getAppValueBool('force', '0');
$topMenuApps = $this->config->getAppValueArray('top-menu-apps', '[]');
if ($this->user) {
$userTopMenuApps = $this->config->getUserValueArray($this->user, 'top-menu-apps', '[]');
if (!empty($userTopMenuApps)) {
if (!empty($userTopMenuApps) && !$isForced) {
$topMenuApps = $userTopMenuApps;
}
}