aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Share
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Share')
-rw-r--r--lib/public/Share/IAttributes.php1
-rw-r--r--lib/public/Share/IManager.php8
-rw-r--r--lib/public/Share/IShare.php7
-rw-r--r--lib/public/Share/IShareHelper.php1
4 files changed, 17 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..5d8c64e1314 100644
--- a/lib/public/Share/IShare.php
+++ b/lib/public/Share/IShare.php
@@ -633,4 +633,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