aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/lib
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-02-15 17:45:09 +0100
committernextcloud-command <nextcloud-command@users.noreply.github.com>2022-04-05 17:04:17 +0000
commita29251e02df0157741afaddbc202617e6eb1c840 (patch)
treee6f45cc8f5f69d3358cac3f0b50c058a5cfcb1a3 /apps/settings/lib
parenta99fdf5600c9e4be23b4adb153c33298650e3fc1 (diff)
downloadnextcloud-server-a29251e02df0157741afaddbc202617e6eb1c840.tar.gz
nextcloud-server-a29251e02df0157741afaddbc202617e6eb1c840.zip
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 'apps/settings/lib')
-rw-r--r--apps/settings/lib/Settings/Admin/Sharing.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php
index 15f74c40e1e..a5f85003fa4 100644
--- a/apps/settings/lib/Settings/Admin/Sharing.php
+++ b/apps/settings/lib/Settings/Admin/Sharing.php
@@ -72,6 +72,11 @@ class Sharing implements IDelegatedSettings {
$linksExcludeGroupsList = !is_null(json_decode($linksExcludedGroups))
? implode('|', json_decode($linksExcludedGroups, true)) : '';
+ $excludedPasswordGroups = $this->config->getAppValue('core', 'shareapi_enforce_links_password_excluded_groups', '');
+ $excludedPasswordGroupsList = !is_null(json_decode($excludedPasswordGroups))
+ ? implode('|', json_decode($excludedPasswordGroups, true)) : '';
+
+
$parameters = [
// Built-In Sharing
'sharingAppEnabled' => $this->appManager->isEnabledForUser('files_sharing'),
@@ -84,7 +89,9 @@ class Sharing implements IDelegatedSettings {
'restrictUserEnumerationToGroup' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no'),
'restrictUserEnumerationToPhone' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_phone', 'no'),
'restrictUserEnumerationFullMatch' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes'),
- 'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(),
+ 'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(false),
+ 'passwordExcludedGroups' => $excludedPasswordGroupsList,
+ 'passwordExcludedGroupsFeatureEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),
'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(),
'shareAPIEnabled' => $this->config->getAppValue('core', 'shareapi_enabled', 'yes'),
'shareDefaultExpireDateSet' => $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no'),