summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/backend
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/backend')
-rw-r--r--apps/files_external/lib/backend/backend.php6
-rw-r--r--apps/files_external/lib/backend/local.php2
-rw-r--r--apps/files_external/lib/backend/sftp_key.php2
-rw-r--r--apps/files_external/lib/backend/smb_oc.php2
4 files changed, 4 insertions, 8 deletions
diff --git a/apps/files_external/lib/backend/backend.php b/apps/files_external/lib/backend/backend.php
index 2a2add3ac59..90d5d38ed94 100644
--- a/apps/files_external/lib/backend/backend.php
+++ b/apps/files_external/lib/backend/backend.php
@@ -22,7 +22,7 @@
namespace OCA\Files_External\Lib\Backend;
use \OCA\Files_External\Lib\StorageConfig;
-use \OCA\Files_External\Lib\PermissionsTrait;
+use \OCA\Files_External\Lib\VisibilityTrait;
use \OCA\Files_External\Lib\FrontendDefinitionTrait;
use \OCA\Files_External\Lib\PriorityTrait;
use \OCA\Files_External\Lib\DependencyTrait;
@@ -43,7 +43,7 @@ use \OCA\Files_External\Lib\Auth\AuthMechanism;
* scheme, which are provided from the authentication mechanism.
*
* This class uses the following traits:
- * - PermissionsTrait
+ * - VisibilityTrait
* Restrict usage to admin-only/none
* - FrontendDefinitionTrait
* Specify configuration parameters and other definitions
@@ -56,7 +56,7 @@ use \OCA\Files_External\Lib\Auth\AuthMechanism;
*/
class Backend implements \JsonSerializable {
- use PermissionsTrait;
+ use VisibilityTrait;
use FrontendDefinitionTrait;
use PriorityTrait;
use DependencyTrait;
diff --git a/apps/files_external/lib/backend/local.php b/apps/files_external/lib/backend/local.php
index a6635491b6e..a80b437fab7 100644
--- a/apps/files_external/lib/backend/local.php
+++ b/apps/files_external/lib/backend/local.php
@@ -39,7 +39,7 @@ class Local extends Backend {
->addParameters([
(new DefinitionParameter('datadir', $l->t('Location'))),
])
- ->setAllowedPermissions(BackendService::USER_PERSONAL, BackendService::PERMISSION_NONE)
+ ->setAllowedVisibility(BackendService::VISIBILITY_ADMIN)
->setPriority(BackendService::PRIORITY_DEFAULT + 50)
->addAuthScheme(AuthMechanism::SCHEME_NULL)
->setLegacyAuthMechanism($legacyAuth)
diff --git a/apps/files_external/lib/backend/sftp_key.php b/apps/files_external/lib/backend/sftp_key.php
index 6a75172026d..4a7f565eb19 100644
--- a/apps/files_external/lib/backend/sftp_key.php
+++ b/apps/files_external/lib/backend/sftp_key.php
@@ -40,8 +40,6 @@ 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 d21b0ddaf42..a3f3a824040 100644
--- a/apps/files_external/lib/backend/smb_oc.php
+++ b/apps/files_external/lib/backend/smb_oc.php
@@ -51,8 +51,6 @@ class SMB_OC 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)
->setPriority(BackendService::PRIORITY_DEFAULT - 10)
->addAuthScheme(AuthMechanism::SCHEME_PASSWORD)
->setLegacyAuthMechanism($legacyAuth)