Merge branch 'fix-shared-files-behaviour'

Signed-off-by: binsky <timo@binsky.org>
This commit is contained in:
binsky 2024-01-03 17:27:18 +01:00
commit 9dcd49dae5
No known key found for this signature in database
GPG key ID: B438F7FA2E3AC98F

View file

@ -155,6 +155,11 @@ class CredentialController extends ApiController {
if (!$this->settings->isEnabled('user_sharing_enabled')) { if (!$this->settings->isEnabled('user_sharing_enabled')) {
return new DataResponse(['msg' => 'Not authorized'], Http::STATUS_UNAUTHORIZED); return new DataResponse(['msg' => 'Not authorized'], Http::STATUS_UNAUTHORIZED);
} }
if (!$acl->hasPermission(SharingACL::FILES)) {
// what ever the client transmitted, if it has no files permission, the previous files content will be preserved
$credential['files'] = $storedCredential->getFiles();
}
} }