diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-07-24 11:53:53 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-08-02 08:39:24 +0200 |
commit | 72aaf2e5fbf501eeb4cae0445cd1398edbbacf37 (patch) | |
tree | abfc5c5f82e804e7606b25944f778b9abfcd75b1 /apps/user_ldap/lib | |
parent | f1066fd769cd1e07d1aa67fb620d390d67de2bd9 (diff) | |
download | nextcloud-server-72aaf2e5fbf501eeb4cae0445cd1398edbbacf37.tar.gz nextcloud-server-72aaf2e5fbf501eeb4cae0445cd1398edbbacf37.zip |
files_external: Make sure the correct user context is used in substitution of variables
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r-- | apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php b/apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php index 98a3cc71263..9445adbd5b6 100644 --- a/apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php +++ b/apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php @@ -25,20 +25,12 @@ namespace OCA\User_LDAP\Handler; use OCA\Files_External\Config\IConfigHandler; use OCA\Files_External\Config\SimpleSubstitutionTrait; +use OCA\Files_External\Config\UserContext; use OCA\User_LDAP\User_Proxy; -use OCP\IUserSession; -class ExtStorageConfigHandler implements IConfigHandler { +class ExtStorageConfigHandler extends UserContext implements IConfigHandler { use SimpleSubstitutionTrait; - /** @var IUserSession */ - private $session; - - public function __construct(IUserSession $session) { - $this->placeholder = 'home'; - $this->session = $session; - } - /** * @param mixed $optionValue * @return mixed the same type as $optionValue @@ -46,7 +38,8 @@ class ExtStorageConfigHandler implements IConfigHandler { * @throws \Exception */ public function handle($optionValue) { - $user = $this->session->getUser(); + $this->placeholder = 'home'; + $user = $this->getSession()->getUser(); if($user === null) { return $optionValue; } |