add api to get shares from a specific user

remotes/origin/ldap_group_count
Bjoern Schiessle 13 years ago
parent 6d87dacad4
commit c4e0fb75a4
  1. 16
      lib/private/share/share.php
  2. 16
      lib/public/share.php

@ -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

@ -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

Loading…
Cancel
Save