diff options
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'; } } |