diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2019-08-02 14:07:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-02 14:07:39 +0200 |
commit | bc409167f2d2fbe83217f8579bc0507a7b8c9753 (patch) | |
tree | 8552bdb66f859b36c54e306d548f1b5b56e0309c /apps/user_ldap | |
parent | 67f90cb6826f571937c3120979508b13fa644448 (diff) | |
parent | ef237f8e3668f7c4587b457dda9da42e83db62c4 (diff) | |
download | nextcloud-server-bc409167f2d2fbe83217f8579bc0507a7b8c9753.tar.gz nextcloud-server-bc409167f2d2fbe83217f8579bc0507a7b8c9753.zip |
Merge pull request #16525 from nextcloud/bugfix/external-user-substitution
files_external: proper user context for sharing
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php b/apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php index 98a3cc71263..ac807a63d13 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,9 @@ class ExtStorageConfigHandler implements IConfigHandler { * @throws \Exception */ public function handle($optionValue) { - $user = $this->session->getUser(); + $this->placeholder = 'home'; + $user = $this->getUser(); + if($user === null) { return $optionValue; } |