Merge branch 'sharing_no_groups' of github.com:nextcloud/passman into sharing_no_groups

This commit is contained in:
brantje 2016-10-02 22:04:00 +02:00
commit 326f9dcac7
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F
2 changed files with 4 additions and 1 deletions

View file

@ -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 = ?";

View file

@ -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']);