fix: remove duplicate 'allow creating local storage' check

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2026-05-04 18:23:26 +02:00
parent a2eb38fefc
commit 1dc3019b96
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB
2 changed files with 0 additions and 19 deletions

View file

@ -82,16 +82,6 @@ class GlobalStoragesController extends StoragesController {
$applicableGroups,
$priority,
) {
$canCreateNewLocalStorage = $this->config->getSystemValue('files_external_allow_create_new_local', true);
if (!$canCreateNewLocalStorage && $backend === 'local') {
return new DataResponse(
[
'message' => $this->l10n->t('Forbidden to manage local mounts')
],
Http::STATUS_FORBIDDEN
);
}
$newStorage = $this->createStorage(
$mountPoint,
$backend,

View file

@ -109,15 +109,6 @@ class UserStoragesController extends StoragesController {
$backendOptions,
$mountOptions,
) {
$canCreateNewLocalStorage = $this->config->getSystemValue('files_external_allow_create_new_local', true);
if (!$canCreateNewLocalStorage && $backend === 'local') {
return new DataResponse(
[
'message' => $this->l10n->t('Forbidden to manage local mounts')
],
Http::STATUS_FORBIDDEN
);
}
$newStorage = $this->createStorage(
$mountPoint,
$backend,