add option: the menu is enabled by default for users

This commit is contained in:
Simon Vieille 2020-10-19 13:44:07 +02:00
commit 80700cac32
Signed by: deblan
GPG key ID: 03383D15A1D31745
6 changed files with 38 additions and 2 deletions

View file

@ -58,7 +58,16 @@ class Application extends App
$isForced = (bool) $this->config->getAppValue(self::APP_ID, 'force', '0');
if (null !== $this->user && !$isForced) {
$enabled = (bool) $this->config->getUserValue($this->user->getUid(), self::APP_ID, 'enabled', '1');
$enabled = (bool) $this->config->getUserValue(
$this->user->getUid(),
self::APP_ID,
'enabled',
$this->config->getAppValue(
self::APP_ID,
'default-enabled',
'1'
)
);
}
return $enabled;