diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-04-06 10:13:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 10:13:23 +0200 |
commit | b8b4d247b4382d7c51323976a3a17e1416dcfe0a (patch) | |
tree | dac3acf9277dd007ea3f22712d0c9c29742beb65 /apps/settings/lib | |
parent | d2289519a3284f89f264de4d14aed565b66c46d7 (diff) | |
parent | a29251e02df0157741afaddbc202617e6eb1c840 (diff) | |
download | nextcloud-server-b8b4d247b4382d7c51323976a3a17e1416dcfe0a.tar.gz nextcloud-server-b8b4d247b4382d7c51323976a3a17e1416dcfe0a.zip |
Merge pull request #31194 from nextcloud/feat/allow-to-exclude-groups-from-password-enforcement
Allow to disable password policy enforcement for selected groups
Diffstat (limited to 'apps/settings/lib')
-rw-r--r-- | apps/settings/lib/Settings/Admin/Sharing.php | 9 |
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'), |