mirror of
https://github.com/nextcloud/passman.git
synced 2025-02-25 07:53:32 +08:00
fix overwriting shared files field without permission
This commit is contained in:
parent
82eccc6f1a
commit
a56b9d7162
1 changed files with 5 additions and 0 deletions
|
@ -155,6 +155,11 @@ class CredentialController extends ApiController {
|
|||
if (!$this->settings->isEnabled('user_sharing_enabled')) {
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue