aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-02 09:55:32 +0200
committernextcloud-command <nextcloud-command@users.noreply.github.com>2024-09-03 15:13:57 +0000
commite08bf1f4b0f39757d3b079ec742fe53fde26eb32 (patch)
tree4b57bd10ee970147287d84ce418f42a927f9582b /apps
parent1e237c4991084d2a9747768f791b7b1fac60a509 (diff)
downloadnextcloud-server-e08bf1f4b0f39757d3b079ec742fe53fde26eb32.tar.gz
nextcloud-server-e08bf1f4b0f39757d3b079ec742fe53fde26eb32.zip
fix(settings): Fix sharing exclude groups from password requirement option not working
Signed-off-by: provokateurin <kate@provokateurin.de> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/lib/Settings/Admin/Sharing.php4
-rw-r--r--apps/settings/src/components/AdminSettingsSharingForm.vue8
-rw-r--r--apps/settings/tests/Settings/Admin/SharingTest.php8
3 files changed, 10 insertions, 10 deletions
diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php
index ec9dc0ddfd1..5e8d9498767 100644
--- a/apps/settings/lib/Settings/Admin/Sharing.php
+++ b/apps/settings/lib/Settings/Admin/Sharing.php
@@ -81,8 +81,8 @@ class Sharing implements IDelegatedSettings {
'restrictUserEnumerationFullMatchEmail' => $this->getHumanBooleanConfig('core', 'shareapi_restrict_user_enumeration_full_match_email', true),
'restrictUserEnumerationFullMatchIgnoreSecondDN' => $this->getHumanBooleanConfig('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn'),
'enforceLinksPassword' => Util::isPublicLinkPasswordRequired(false),
- 'passwordExcludedGroups' => json_decode($excludedPasswordGroups) ?? [],
- 'passwordExcludedGroupsFeatureEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),
+ 'enforceLinksPasswordExcludedGroups' => json_decode($excludedPasswordGroups) ?? [],
+ 'enforceLinksPasswordExcludedGroupsEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),
'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(),
'onlyShareWithGroupMembersExcludeGroupList' => json_decode($onlyShareWithGroupMembersExcludeGroupList) ?? [],
'defaultExpireDate' => $this->getHumanBooleanConfig('core', 'shareapi_default_expire_date'),
diff --git a/apps/settings/src/components/AdminSettingsSharingForm.vue b/apps/settings/src/components/AdminSettingsSharingForm.vue
index 6842f7cbe93..d1eab1a63df 100644
--- a/apps/settings/src/components/AdminSettingsSharingForm.vue
+++ b/apps/settings/src/components/AdminSettingsSharingForm.vue
@@ -62,9 +62,9 @@
<NcCheckboxRadioSwitch :checked.sync="settings.enforceLinksPassword" :disabled="!settings.enableLinkPasswordByDefault">
{{ t('settings', 'Enforce password protection') }}
</NcCheckboxRadioSwitch>
- <label v-if="settings.passwordExcludedGroupsFeatureEnabled" class="sharing__labeled-entry sharing__input">
+ <label v-if="settings.enforceLinksPasswordExcludedGroupsEnabled" class="sharing__labeled-entry sharing__input">
<span>{{ t('settings', 'Exclude groups from password requirements') }}</span>
- <NcSettingsSelectGroup v-model="settings.passwordExcludedGroups"
+ <NcSettingsSelectGroup v-model="settings.enforceLinksPasswordExcludedGroups"
style="width: 100%"
:disabled="!settings.enforceLinksPassword || !settings.enableLinkPasswordByDefault" />
</label>
@@ -233,8 +233,8 @@ interface IShareSettings {
restrictUserEnumerationFullMatchEmail: boolean
restrictUserEnumerationFullMatchIgnoreSecondDN: boolean
enforceLinksPassword: boolean
- passwordExcludedGroups: string[]
- passwordExcludedGroupsFeatureEnabled: boolean
+ enforceLinksPasswordExcludedGroups: string[]
+ enforceLinksPasswordExcludedGroupsEnabled: boolean
onlyShareWithGroupMembers: boolean
onlyShareWithGroupMembersExcludeGroupList: string[]
defaultExpireDate: boolean
diff --git a/apps/settings/tests/Settings/Admin/SharingTest.php b/apps/settings/tests/Settings/Admin/SharingTest.php
index ae98ce6635b..965001f5f4d 100644
--- a/apps/settings/tests/Settings/Admin/SharingTest.php
+++ b/apps/settings/tests/Settings/Admin/SharingTest.php
@@ -162,9 +162,9 @@ class SharingTest extends TestCase {
'remoteExpireAfterNDays' => '7',
'enforceRemoteExpireDate' => false,
'allowLinksExcludeGroups' => [],
- 'passwordExcludedGroups' => [],
- 'passwordExcludedGroupsFeatureEnabled' => false,
'onlyShareWithGroupMembersExcludeGroupList' => [],
+ 'enforceLinksPasswordExcludedGroups' => [],
+ 'enforceLinksPasswordExcludedGroupsEnabled' => false,
]
],
);
@@ -255,9 +255,9 @@ class SharingTest extends TestCase {
'remoteExpireAfterNDays' => '7',
'enforceRemoteExpireDate' => false,
'allowLinksExcludeGroups' => [],
- 'passwordExcludedGroups' => [],
- 'passwordExcludedGroupsFeatureEnabled' => false,
'onlyShareWithGroupMembersExcludeGroupList' => [],
+ 'enforceLinksPasswordExcludedGroups' => [],
+ 'enforceLinksPasswordExcludedGroupsEnabled' => false,
]
],
);