mirror of
https://github.com/nextcloud/passman.git
synced 2025-09-25 22:35:55 +08:00
Remove files field from sharing response if user does not have permission to see files
This commit is contained in:
parent
68cf16c10b
commit
4844aa1ce0
1 changed files with 2 additions and 0 deletions
|
@ -103,6 +103,8 @@ class ShareService {
|
|||
|
||||
$tmp = $entry->jsonSerialize();
|
||||
$tmp['credential_data'] = $this->credential->getCredentialById($entry->getItemId())->jsonSerialize();
|
||||
|
||||
if (!$entry->hasPermission(SharingACL::FILES)) unset($tmp['credential_data']['files']);
|
||||
unset($tmp['credential_data']['shared_key']);
|
||||
$return[] = $tmp;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue