From 09b3883d9ceae77793e524209090f2e36ab61260 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 27 Apr 2016 15:24:28 +0200 Subject: Updated canUser* functions in SystemTagManager to accept objects --- lib/public/SystemTag/ISystemTagManager.php | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'lib/public') diff --git a/lib/public/SystemTag/ISystemTagManager.php b/lib/public/SystemTag/ISystemTagManager.php index 7fb0c21436c..283ca63e4f6 100644 --- a/lib/public/SystemTag/ISystemTagManager.php +++ b/lib/public/SystemTag/ISystemTagManager.php @@ -22,6 +22,9 @@ namespace OCP\SystemTag; +use OCP\IUser; +use OCP\SystemTag\ISystemTag; + /** * Public interface to access and manage system-wide tags. * @@ -117,33 +120,25 @@ interface ISystemTagManager { * Checks whether the given user is allowed to assign/unassign the tag with the * given id. * - * @param string|\OCP\SystemTag\ISystemTag $tag tag id or system tag - * @param string $userId user id + * @param ISystemTag $tag tag to check permission for + * @param IUser $user user to check permission for * * @return true if the user is allowed to assign/unassign the tag, false otherwise * - * @throws \OCP\SystemTag\TagNotFoundException if tag with the given id does not exist - * @throws \OCP\UserNotFoundException if the given user id does not exist - * @throws \InvalidArgumentException if the tag id is invalid (string instead of integer, etc.) - * * @since 9.1.0 */ - public function canUserAssignTag($tag, $userId); + public function canUserAssignTag(ISystemTag $tag, IUser $user); /** * Checks whether the given user is allowed to see the tag with the given id. * - * @param string|\OCP\SystemTag\ISystemTag $tag tag id or system tag - * @param string $userId user id + * @param ISystemTag $tag tag to check permission for + * @param IUser $user user to check permission for * * @return true if the user is allowed to assign/unassign the tag, false otherwise * - * @throws \OCP\SystemTag\TagNotFoundException if tag with the given id does not exist - * @throws \OCP\UserNotFoundException if the given user id does not exist - * @throws \InvalidArgumentException if the tag id is invalid (string instead of integer, etc.) - * * @since 9.1.0 */ - public function canUserSeeTag($tag, $userId); + public function canUserSeeTag(ISystemTag $tag, IUser $userId); } -- cgit v1.2.3