mirror of
https://github.com/nextcloud/passman.git
synced 2025-02-27 00:43:02 +08:00
Merge branch 'sharing_no_groups' of github.com:nextcloud/passman into sharing_no_groups
This commit is contained in:
commit
5f337e323a
1 changed files with 7 additions and 0 deletions
|
@ -11,6 +11,7 @@ namespace OCA\Passman\Service;
|
|||
|
||||
use Icewind\SMB\Share;
|
||||
use OCA\Passman\Db\CredentialMapper;
|
||||
use OCA\Passman\Db\CredentialRevision;
|
||||
use OCA\Passman\Db\ShareRequest;
|
||||
use OCA\Passman\Db\ShareRequestMapper;
|
||||
use OCA\Passman\Db\SharingACL;
|
||||
|
@ -118,6 +119,12 @@ class ShareService {
|
|||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets history from the given item checking the user's permissions to access it
|
||||
* @param $user_id
|
||||
* @param $item_guid
|
||||
* @return CredentialRevision[]
|
||||
*/
|
||||
public function getItemHistory($user_id, $item_guid) {
|
||||
$acl = $this->sharingACL->getItemACL($user_id, $item_guid);
|
||||
if (!$acl->hasPermission(SharingACL::READ | SharingACL::HISTORY)) return [];
|
||||
|
|
Loading…
Reference in a new issue