summaryrefslogtreecommitdiffstats
path: root/settings/Settings
diff options
context:
space:
mode:
authorGreta Doci <gretadoci@gmail.com>2019-06-12 14:26:01 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2019-09-15 12:04:27 +0200
commit0a874c51af8dd6652c694f0545489af23d53771a (patch)
tree6781c94e2bb54cf4392ae826abf08086ff277321 /settings/Settings
parentd231fc9843b117c3361ce0b4e030d55c59607005 (diff)
downloadnextcloud-server-0a874c51af8dd6652c694f0545489af23d53771a.tar.gz
nextcloud-server-0a874c51af8dd6652c694f0545489af23d53771a.zip
Disable app token creation for impersonated people, ref #15539
Signed-off-by: Greta Doci <gretadoci@gmail.com>
Diffstat (limited to 'settings/Settings')
-rw-r--r--settings/Settings/Personal/Security.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/settings/Settings/Personal/Security.php b/settings/Settings/Personal/Security.php
index 29c161f9da7..1d40377f184 100644
--- a/settings/Settings/Personal/Security.php
+++ b/settings/Settings/Personal/Security.php
@@ -80,11 +80,18 @@ class Security implements ISettings {
$passwordChangeSupported = $user->canChangePassword();
}
+ $this->initialStateService->provideInitialState(
+ 'settings',
+ 'can_create_app_token',
+ $this->userSession->getImpersonatingUserID() !== null
+ );
+
return new TemplateResponse('settings', 'settings/personal/security', [
'passwordChangeSupported' => $passwordChangeSupported,
'twoFactorProviderData' => $this->getTwoFactorProviderData(),
'themedark' => $this->config->getUserValue($this->uid, 'accessibility', 'theme', false)
]);
+
}
public function getSection(): string {