diff options
Diffstat (limited to 'lib/public/Share')
-rw-r--r-- | lib/public/Share/IAttributes.php | 1 | ||||
-rw-r--r-- | lib/public/Share/IManager.php | 8 | ||||
-rw-r--r-- | lib/public/Share/IShare.php | 21 | ||||
-rw-r--r-- | lib/public/Share/IShareHelper.php | 1 | ||||
-rw-r--r-- | lib/public/Share/IShareProvider.php | 8 |
5 files changed, 39 insertions, 0 deletions
diff --git a/lib/public/Share/IAttributes.php b/lib/public/Share/IAttributes.php index fad19c60aad..9ddd8275dd6 100644 --- a/lib/public/Share/IAttributes.php +++ b/lib/public/Share/IAttributes.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php index 89d6f5e4a87..35915ad9d90 100644 --- a/lib/public/Share/IManager.php +++ b/lib/public/Share/IManager.php @@ -473,6 +473,14 @@ interface IManager { public function allowCustomTokens(): bool; /** + * Check if the current user can view the share + * even if the download is disabled. + * + * @since 32.0.0 + */ + public function allowViewWithoutDownload(): bool; + + /** * Check if the current user can enumerate the target user * * @param IUser|null $currentUser diff --git a/lib/public/Share/IShare.php b/lib/public/Share/IShare.php index 337210e3b91..a1bdb01fcd2 100644 --- a/lib/public/Share/IShare.php +++ b/lib/public/Share/IShare.php @@ -530,6 +530,20 @@ interface IShare { public function getToken(); /** + * Set the parent of this share + * + * @since 9.0.0 + */ + public function setParent(int $parent): self; + + /** + * Get the parent of this share. + * + * @since 9.0.0 + */ + public function getParent(): ?int; + + /** * Set the target path of this share relative to the recipients user folder. * * @param string $target @@ -633,4 +647,11 @@ interface IShare { * @since 31.0.0 */ public function getReminderSent(): bool; + + /** + * Check if the current user can see this share files contents. + * This will check the download permissions as well as the global + * admin setting to allow viewing files without downloading. + */ + public function canSeeContent(): bool; } diff --git a/lib/public/Share/IShareHelper.php b/lib/public/Share/IShareHelper.php index c4a33e717f9..152fc99a446 100644 --- a/lib/public/Share/IShareHelper.php +++ b/lib/public/Share/IShareHelper.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php index 9d7c8013a36..23187ca833e 100644 --- a/lib/public/Share/IShareProvider.php +++ b/lib/public/Share/IShareProvider.php @@ -208,4 +208,12 @@ interface IShareProvider { * @since 18.0.0 */ public function getAllShares(): iterable; + + /** + * Get all children of this share + * + * @return IShare[] + * @since 9.0.0 + */ + public function getChildren(IShare $parent); } |