diff options
author | Bart Visscher <bartv@thisnet.nl> | 2014-04-28 17:59:41 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2014-04-28 17:59:41 +0200 |
commit | 66b1ad0a9be76a179155c8ce6a47310f93e8bb42 (patch) | |
tree | c9ba3dfabe91602db2966d187f812bdfcd9dc3da /lib/public/share.php | |
parent | a9bf3df82d0c3d0f54c9fe45dbb911756f37b166 (diff) | |
parent | c591cf0836720a4cfc6d441b363ece46ed19eadc (diff) | |
download | nextcloud-server-66b1ad0a9be76a179155c8ce6a47310f93e8bb42.tar.gz nextcloud-server-66b1ad0a9be76a179155c8ce6a47310f93e8bb42.zip |
Merge branch 'master' into type-hinting-sharing
Conflicts:
apps/files_sharing/lib/share/file.php
apps/files_sharing/tests/api.php
lib/private/share/share.php
Diffstat (limited to 'lib/public/share.php')
-rw-r--r-- | lib/public/share.php | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index 4306c1b038f..acda709b552 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -64,14 +64,15 @@ class Share extends \OC\Share\Constants { /** * Find which users can access a shared item * @param string $path to the file - * @param string $user owner of the file + * @param string $ownerUser owner of the file * @param bool $includeOwner include owner to the list of users with access to the file + * @param bool $returnUserPaths Return an array with the user => path map * @return array * @note $path needs to be relative to user data dir, e.g. 'file.txt' * not '/admin/data/file.txt' */ - public static function getUsersSharingFile($path, $user, $includeOwner = false) { - return \OC\Share\Share::getUsersSharingFile($path, $user, $includeOwner); + public static function getUsersSharingFile($path, $ownerUser, $includeOwner = false, $returnUserPaths = false) { + return \OC\Share\Share::getUsersSharingFile($path, $ownerUser, $includeOwner, $returnUserPaths); } /** @@ -90,6 +91,22 @@ class Share extends \OC\Share\Constants { } /** + * 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 * @param string $itemTarget |