Skip to content

Commit 728ee25

Browse files
committed
fix: remove duplicate 'allow creating local storage' check
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 887dfeb commit 728ee25

2 files changed

Lines changed: 0 additions & 19 deletions

File tree

apps/files_external/lib/Controller/GlobalStoragesController.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,6 @@ public function create(
7777
?array $applicableGroups,
7878
?int $priority,
7979
): DataResponse {
80-
$canCreateNewLocalStorage = $this->config->getSystemValue('files_external_allow_create_new_local', true);
81-
if (!$canCreateNewLocalStorage && $backend === 'local') {
82-
return new DataResponse(
83-
[
84-
'message' => $this->l10n->t('Forbidden to manage local mounts')
85-
],
86-
Http::STATUS_FORBIDDEN
87-
);
88-
}
89-
9080
$newStorage = $this->createStorage(
9181
$mountPoint,
9282
$backend,

apps/files_external/lib/Controller/UserStoragesController.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,6 @@ public function create(
102102
array $backendOptions,
103103
?array $mountOptions,
104104
): DataResponse {
105-
$canCreateNewLocalStorage = $this->config->getSystemValue('files_external_allow_create_new_local', true);
106-
if (!$canCreateNewLocalStorage && $backend === 'local') {
107-
return new DataResponse(
108-
[
109-
'message' => $this->l10n->t('Forbidden to manage local mounts')
110-
],
111-
Http::STATUS_FORBIDDEN
112-
);
113-
}
114105
$newStorage = $this->createStorage(
115106
$mountPoint,
116107
$backend,

0 commit comments

Comments
 (0)