From 0c2dc3bc8cdca46afc2bc08da4a985610093f2af Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 20 Mar 2017 14:22:06 +0100 Subject: Fix comments Signed-off-by: Roeland Jago Douma --- lib/public/Share/IManager.php | 5 +++-- lib/public/Share/IShareHelper.php | 44 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 lib/public/Share/IShareHelper.php (limited to 'lib/public') diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php index 45e0e9d80c2..26c3f2b42e6 100644 --- a/lib/public/Share/IManager.php +++ b/lib/public/Share/IManager.php @@ -216,10 +216,11 @@ interface IManager { * * @param \OCP\Files\Node $path * @param bool $recursive Should we check all parent folders as well + * @param bool $currentAccess Should the user have currently access to the file * @return array - * @since 9.2.0 + * @since 12 */ - public function getAccessList(\OCP\Files\Node $path, $recursive = true); + public function getAccessList(\OCP\Files\Node $path, $recursive = true, $currentAccess = false); /** * Instantiates a new share object. This is to be passed to diff --git a/lib/public/Share/IShareHelper.php b/lib/public/Share/IShareHelper.php new file mode 100644 index 00000000000..5e99f86832d --- /dev/null +++ b/lib/public/Share/IShareHelper.php @@ -0,0 +1,44 @@ + + * + * @author Roeland Jago Douma + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ +namespace OCP\Share; + +use OCP\Files\Node; + +/** + * Interface IShareHelper + * + * @package OCP\Share + * @since 12 + */ +interface IShareHelper { + + /** + * If a user has access to a file + * + * @param Node $node + * @param array $users Array of userIds + * @return array Mapping $uid to an array of nodes + * @since 12 + */ + public function getPathsForAccessList(Node $node, $users); +} -- cgit v1.2.3