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 887dfeb886
commit 728ee257b3
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB
2 changed files with 0 additions and 19 deletions

View file

@ -77,16 +77,6 @@ class GlobalStoragesController extends StoragesController {
?array $applicableGroups,
?int $priority,
): DataResponse {
$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

@ -102,15 +102,6 @@ class UserStoragesController extends StoragesController {
array $backendOptions,
?array $mountOptions,
): DataResponse {
$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,