summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/backend
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-08-28 16:16:48 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-08-28 17:43:41 +0100
commit0b97a05e7bd631d66de1c2aee115113ada8a5f63 (patch)
tree24fd73d02ffc3cc465c5fd96c937bd66e32b8624 /apps/files_external/lib/backend
parentd2e3c17c0000bc0020f1ff641190452f370434de (diff)
downloadnextcloud-server-0b97a05e7bd631d66de1c2aee115113ada8a5f63.tar.gz
nextcloud-server-0b97a05e7bd631d66de1c2aee115113ada8a5f63.zip
Prevent creation of deprecated backends
Diffstat (limited to 'apps/files_external/lib/backend')
-rw-r--r--apps/files_external/lib/backend/sftp_key.php2
-rw-r--r--apps/files_external/lib/backend/smb_oc.php2
2 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_external/lib/backend/sftp_key.php b/apps/files_external/lib/backend/sftp_key.php
index 4a7f565eb19..6a75172026d 100644
--- a/apps/files_external/lib/backend/sftp_key.php
+++ b/apps/files_external/lib/backend/sftp_key.php
@@ -40,6 +40,8 @@ class SFTP_Key extends Backend {
(new DefinitionParameter('root', $l->t('Remote subfolder')))
->setFlag(DefinitionParameter::FLAG_OPTIONAL),
])
+ ->removeAllowedPermission(BackendService::USER_PERSONAL, BackendService::PERMISSION_CREATE)
+ ->removeAllowedPermission(BackendService::USER_ADMIN, BackendService::PERMISSION_CREATE)
->addAuthScheme(AuthMechanism::SCHEME_PUBLICKEY)
->setLegacyAuthMechanism($legacyAuth)
;
diff --git a/apps/files_external/lib/backend/smb_oc.php b/apps/files_external/lib/backend/smb_oc.php
index cae3818c76c..67fa8ffb2c4 100644
--- a/apps/files_external/lib/backend/smb_oc.php
+++ b/apps/files_external/lib/backend/smb_oc.php
@@ -49,6 +49,8 @@ class SMB_OC extends Backend {
->setFlag(DefinitionParameter::FLAG_OPTIONAL),
])
->setDependencyCheck('\OC\Files\Storage\SMB::checkDependencies')
+ ->removeAllowedPermission(BackendService::USER_PERSONAL, BackendService::PERMISSION_CREATE)
+ ->removeAllowedPermission(BackendService::USER_ADMIN, BackendService::PERMISSION_CREATE)
->setPriority(BackendService::PRIORITY_DEFAULT - 10)
->addAuthScheme(AuthMechanism::SCHEME_PASSWORD)
->setLegacyAuthMechanism($legacyAuth)