mirror of
https://github.com/nextcloud/passman.git
synced 2024-11-10 17:27:40 +08:00
Merge branch 'sharing_no_groups' of github.com:nextcloud/passman into sharing_no_groups
This commit is contained in:
commit
326f9dcac7
2 changed files with 4 additions and 1 deletions
|
@ -42,7 +42,7 @@ class SharingACLMapper extends Mapper {
|
|||
* Gets the currently accepted share requests from the given user for the given vault guid
|
||||
* @param $user_id
|
||||
* @param $vault_id
|
||||
*
|
||||
* @return SharingACL[]
|
||||
*/
|
||||
public function getVaultEntries($user_id, $vault_id) {
|
||||
$q = "SELECT * FROM ". self::TABLE_NAME ." WHERE user_id = ? AND vault_guid = ?";
|
||||
|
|
|
@ -98,6 +98,9 @@ class ShareService {
|
|||
|
||||
$return = [];
|
||||
foreach ($entries as $entry){
|
||||
// Check if the user can read the credential, probably unnecesary, but just to be sure
|
||||
if (!$entry->hasPermission(SharingACL::READ)) continue;
|
||||
|
||||
$tmp = $entry->jsonSerialize();
|
||||
$tmp['credential_data'] = $this->credential->getCredentialById($entry->getItemId())->jsonSerialize();
|
||||
unset($tmp['credential_data']['shared_key']);
|
||||
|
|
Loading…
Reference in a new issue