From fca2d01de00c9ebbc2b86c28ca32cb7242bac13c Mon Sep 17 00:00:00 2001 From: Marcos Zuriaga Date: Mon, 3 Oct 2016 17:38:57 +0200 Subject: [PATCH] Added documentation --- lib/Service/ShareService.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Service/ShareService.php b/lib/Service/ShareService.php index aad1b7bf..81d535b9 100644 --- a/lib/Service/ShareService.php +++ b/lib/Service/ShareService.php @@ -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 [];