Skip to content

Commit 93cc529

Browse files
provokateurinnextcloud-command
authored andcommitted
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>
1 parent 7f62397 commit 93cc529

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

apps/settings/lib/Settings/Admin/Sharing.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public function getForm() {
5353
'restrictUserEnumerationFullMatchEmail' => $this->getHumanBooleanConfig('core', 'shareapi_restrict_user_enumeration_full_match_email', true),
5454
'restrictUserEnumerationFullMatchIgnoreSecondDN' => $this->getHumanBooleanConfig('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn'),
5555
'enforceLinksPassword' => Util::isPublicLinkPasswordRequired(false),
56-
'passwordExcludedGroups' => json_decode($excludedPasswordGroups) ?? [],
57-
'passwordExcludedGroupsFeatureEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),
56+
'enforceLinksPasswordExcludedGroups' => json_decode($excludedPasswordGroups) ?? [],
57+
'enforceLinksPasswordExcludedGroupsEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),
5858
'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(),
5959
'onlyShareWithGroupMembersExcludeGroupList' => json_decode($onlyShareWithGroupMembersExcludeGroupList) ?? [],
6060
'defaultExpireDate' => $this->getHumanBooleanConfig('core', 'shareapi_default_expire_date'),

apps/settings/src/components/AdminSettingsSharingForm.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
<NcCheckboxRadioSwitch :checked.sync="settings.enforceLinksPassword" :disabled="!settings.enableLinkPasswordByDefault">
4646
{{ t('settings', 'Enforce password protection') }}
4747
</NcCheckboxRadioSwitch>
48-
<label v-if="settings.passwordExcludedGroupsFeatureEnabled" class="sharing__labeled-entry sharing__input">
48+
<label v-if="settings.enforceLinksPasswordExcludedGroupsEnabled" class="sharing__labeled-entry sharing__input">
4949
<span>{{ t('settings', 'Exclude groups from password requirements') }}</span>
50-
<NcSettingsSelectGroup v-model="settings.passwordExcludedGroups"
50+
<NcSettingsSelectGroup v-model="settings.enforceLinksPasswordExcludedGroups"
5151
style="width: 100%"
5252
:disabled="!settings.enforceLinksPassword || !settings.enableLinkPasswordByDefault" />
5353
</label>
@@ -222,8 +222,8 @@ interface IShareSettings {
222222
restrictUserEnumerationFullMatchEmail: boolean
223223
restrictUserEnumerationFullMatchIgnoreSecondDN: boolean
224224
enforceLinksPassword: boolean
225-
passwordExcludedGroups: string[]
226-
passwordExcludedGroupsFeatureEnabled: boolean
225+
enforceLinksPasswordExcludedGroups: string[]
226+
enforceLinksPasswordExcludedGroupsEnabled: boolean
227227
onlyShareWithGroupMembers: boolean
228228
onlyShareWithGroupMembersExcludeGroupList: string[]
229229
defaultExpireDate: boolean

apps/settings/tests/Settings/Admin/SharingTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ public function testGetFormWithoutExcludedGroups(): void {
136136
'remoteExpireAfterNDays' => '7',
137137
'enforceRemoteExpireDate' => false,
138138
'allowLinksExcludeGroups' => [],
139-
'passwordExcludedGroups' => [],
140-
'passwordExcludedGroupsFeatureEnabled' => false,
141139
'onlyShareWithGroupMembersExcludeGroupList' => [],
140+
'enforceLinksPasswordExcludedGroups' => [],
141+
'enforceLinksPasswordExcludedGroupsEnabled' => false,
142142
]
143143
],
144144
);
@@ -229,9 +229,9 @@ public function testGetFormWithExcludedGroups(): void {
229229
'remoteExpireAfterNDays' => '7',
230230
'enforceRemoteExpireDate' => false,
231231
'allowLinksExcludeGroups' => [],
232-
'passwordExcludedGroups' => [],
233-
'passwordExcludedGroupsFeatureEnabled' => false,
234232
'onlyShareWithGroupMembersExcludeGroupList' => [],
233+
'enforceLinksPasswordExcludedGroups' => [],
234+
'enforceLinksPasswordExcludedGroupsEnabled' => false,
235235
]
236236
],
237237
);

dist/settings-vue-settings-admin-sharing.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-vue-settings-admin-sharing.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)