Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-02-15 19:45:09 +0300
committernextcloud-command <nextcloud-command@users.noreply.github.com>2022-04-05 20:04:17 +0300
commita29251e02df0157741afaddbc202617e6eb1c840 (patch)
treee6f45cc8f5f69d3358cac3f0b50c058a5cfcb1a3 /lib/public
parenta99fdf5600c9e4be23b4adb153c33298650e3fc1 (diff)
Allow to disable password policy enforcement for selected groups
Signed-off-by: Carl Schwan <carl@carlschwan.eu> Co-authored-by: Vincent Petry <vincent@nextcloud.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Share/IManager.php4
-rw-r--r--lib/public/Util.php8
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php
index ff4b6af19e0..f6b74c4de4a 100644
--- a/lib/public/Share/IManager.php
+++ b/lib/public/Share/IManager.php
@@ -321,10 +321,12 @@ interface IManager {
/**
* Is password on public link requires
*
+ * @param bool $checkGroupMembership Check group membership exclusion
* @return bool
* @since 9.0.0
+ * @since 24.0.0 Added optional $checkGroupMembership parameter
*/
- public function shareApiLinkEnforcePassword();
+ public function shareApiLinkEnforcePassword(bool $checkGroupMembership = true);
/**
* Is default expire date enabled
diff --git a/lib/public/Util.php b/lib/public/Util.php
index cd6f5f34a69..c8b55bb10e2 100644
--- a/lib/public/Util.php
+++ b/lib/public/Util.php
@@ -547,12 +547,14 @@ class Util {
}
/**
- * check if a password is required for each public link
+ * Check if a password is required for each public link
+ *
+ * @param bool $checkGroupMembership Check group membership exclusion
* @return boolean
* @since 7.0.0
*/
- public static function isPublicLinkPasswordRequired() {
- return \OC_Util::isPublicLinkPasswordRequired();
+ public static function isPublicLinkPasswordRequired(bool $checkGroupMembership = true) {
+ return \OC_Util::isPublicLinkPasswordRequired($checkGroupMembership);
}
/**