diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-10-26 23:27:50 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-10-28 14:23:06 +0300 |
commit | c8f138e2bbf5b906473e5052c64dac56225482dc (patch) | |
tree | 6aee16ba5af11aaf222f9757c3caa21a01444aff | |
parent | 99de3db6f2a9e026cb18685f6d94ec5ba0639624 (diff) |
Do not show Talk sidebar in Files app if Talk is disabled for the user
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r-- | lib/Files/TemplateLoader.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Files/TemplateLoader.php b/lib/Files/TemplateLoader.php index f3fc1b6f5..c7fa5190e 100644 --- a/lib/Files/TemplateLoader.php +++ b/lib/Files/TemplateLoader.php @@ -91,10 +91,14 @@ class TemplateLoader implements IEventListener { return; } + $user = $this->userSession->getUser(); + if ($user instanceof IUser && $this->talkConfig->isDisabledForUser($user)) { + return; + } + Util::addStyle(Application::APP_ID, 'merged-files'); Util::addScript(Application::APP_ID, 'talk-files-sidebar'); - $user = $this->userSession->getUser(); if ($user instanceof IUser) { $this->publishInitialStateForUser($user, $this->rootFolder, $this->appManager); } else { |