add api to get shares from a specific user

This commit is contained in:
Bjoern Schiessle 2014-04-08 14:42:15 +02:00
parent 6d87dacad4
commit c4e0fb75a4
2 changed files with 32 additions and 0 deletions

View File

@ -252,6 +252,22 @@ class Share extends \OC\Share\Constants {
$parameters, $limit, $includeCollections);
}
/**
* Get the items of item type shared with a user
* @param string Item type
* @param sting user id for which user we want the shares
* @param int Format (optional) Format type must be defined by the backend
* @param mixed Parameters (optional)
* @param int Number of items to return (optional) Returns all by default
* @param bool include collections (optional)
* @return Return depends on format
*/
public static function getItemsSharedWithUser($itemType, $user, $format = self::FORMAT_NONE,
$parameters = null, $limit = -1, $includeCollections = false) {
return self::getItems($itemType, null, self::$shareTypeUserAndGroups, $user, null, $format,
$parameters, $limit, $includeCollections);
}
/**
* Get the item of item type shared with the current user
* @param string $itemType

View File

@ -90,6 +90,22 @@ class Share extends \OC\Share\Constants {
return \OC\Share\Share::getItemsSharedWith($itemType, $format, $parameters, $limit, $includeCollections);
}
/**
* Get the items of item type shared with a user
* @param string Item type
* @param sting user id for which user we want the shares
* @param int Format (optional) Format type must be defined by the backend
* @param mixed Parameters (optional)
* @param int Number of items to return (optional) Returns all by default
* @param bool include collections (optional)
* @return Return depends on format
*/
public static function getItemsSharedWithUser($itemType, $user, $format = self::FORMAT_NONE,
$parameters = null, $limit = -1, $includeCollections = false) {
return \OC\Share\Share::getItemsSharedWithUser($itemType, $user, $format, $parameters, $limit, $includeCollections);
}
/**
* Get the item of item type shared with the current user
* @param string $itemType