diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-01-07 21:29:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 21:29:13 +0100 |
commit | 275f15c1fb38175468cb06ecaeedeb402b64c8d2 (patch) | |
tree | 7a4ed88593aa28c243d09ec5c56fbdb6a1e251b1 /apps/files_external/lib/Config/ExternalMountPoint.php | |
parent | 171373a9442ee5af5b42b3989afbe2fa7ad99fbd (diff) | |
parent | 35e5cc88f0e77738bbe47a01d4f95bc9ad40f2f0 (diff) | |
download | nextcloud-server-275f15c1fb38175468cb06ecaeedeb402b64c8d2.tar.gz nextcloud-server-275f15c1fb38175468cb06ecaeedeb402b64c8d2.zip |
Merge pull request #23261 from nextcloud/enh/external-storage-session-type
Expose session based authentication through mount point type
Diffstat (limited to 'apps/files_external/lib/Config/ExternalMountPoint.php')
-rw-r--r-- | apps/files_external/lib/Config/ExternalMountPoint.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/files_external/lib/Config/ExternalMountPoint.php b/apps/files_external/lib/Config/ExternalMountPoint.php index 5c9bbc71e36..1eac000a97f 100644 --- a/apps/files_external/lib/Config/ExternalMountPoint.php +++ b/apps/files_external/lib/Config/ExternalMountPoint.php @@ -24,9 +24,20 @@ namespace OCA\Files_External\Config; use OC\Files\Mount\MountPoint; +use OCA\Files_External\Lib\StorageConfig; +use OCA\Files_External\Lib\Auth\Password\SessionCredentials; class ExternalMountPoint extends MountPoint { + + /** @var StorageConfig */ + protected $storageConfig; + + public function __construct(StorageConfig $storageConfig, $storage, $mountpoint, $arguments = null, $loader = null, $mountOptions = null, $mountId = null) { + $this->storageConfig = $storageConfig; + parent::__construct($storage, $mountpoint, $arguments, $loader, $mountOptions, $mountId); + } + public function getMountType() { - return 'external'; + return ($this->storageConfig->getAuthMechanism() instanceof SessionCredentials) ? 'external-session' : 'external'; } } |