Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-07-24 12:53:53 +0300
committerJulius Härtl <jus@bitgrid.net>2019-08-02 09:39:24 +0300
commit72aaf2e5fbf501eeb4cae0445cd1398edbbacf37 (patch)
treeabfc5c5f82e804e7606b25944f778b9abfcd75b1 /apps/user_ldap/lib
parentf1066fd769cd1e07d1aa67fb620d390d67de2bd9 (diff)
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.php15
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;
}