Signed-off-by: Julius Härtl <jus@bitgrid.net>tags/v19.0.0beta1
@@ -142,6 +142,10 @@ $(document).ready(function(){ | |||
savePublicShareDisclaimerText(this.value); | |||
}); | |||
$('#shareapi_allow_share_dialog_user_enumeration').on('change', function() { | |||
$('#shareapi_restrict_user_enumeration_to_group_setting').toggleClass('hidden', !this.checked); | |||
}) | |||
$('#allowLinks').change(function() { | |||
$("#publicLinkSettings").toggleClass('hidden', !this.checked); | |||
$('#setDefaultExpireDate').toggleClass('hidden', !(this.checked && $('#shareapiDefaultExpireDate')[0].checked)); |
@@ -73,6 +73,7 @@ class Sharing implements ISettings { | |||
'allowPublicUpload' => $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes'), | |||
'allowResharing' => $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes'), | |||
'allowShareDialogUserEnumeration' => $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes'), | |||
'restrictUserEnumerationToGroup' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no'), | |||
'enforceLinkPassword' => Util::isPublicLinkPasswordRequired(), | |||
'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(), | |||
'shareAPIEnabled' => $this->config->getAppValue('core', 'shareapi_enabled', 'yes'), |
@@ -109,11 +109,19 @@ | |||
<br /> | |||
<em><?php p($l->t('These groups will still be able to receive shares, but not to initiate them.')); ?></em> | |||
</p> | |||
<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>"> | |||
<input type="checkbox" name="shareapi_allow_share_dialog_user_enumeration" value="1" id="shareapi_allow_share_dialog_user_enumeration" class="checkbox" | |||
<?php if ($_['allowShareDialogUserEnumeration'] === 'yes') print_unescaped('checked="checked"'); ?> /> | |||
<label for="shareapi_allow_share_dialog_user_enumeration"><?php p($l->t('Allow username autocompletion in share dialog. If this is disabled the full username or email address needs to be entered.'));?></label><br /> | |||
</p> | |||
<p id="shareapi_restrict_user_enumeration_to_group_setting" class="indent <?php if ($_['shareAPIEnabled'] === 'no' || $_['allowShareDialogUserEnumeration'] === 'no') p('hidden');?>"> | |||
<input type="checkbox" name="shareapi_restrict_user_enumeration_to_group" value="1" id="shareapi_restrict_user_enumeration_to_group" class="checkbox" | |||
<?php if ($_['restrictUserEnumerationToGroup'] === 'yes') print_unescaped('checked="checked"'); ?> /> | |||
<label for="shareapi_restrict_user_enumeration_to_group"><?php p($l->t('Restrict username autocompletion to users within the same groups'));?></label><br /> | |||
</p> | |||
<p> | |||
<input type="checkbox" id="publicShareDisclaimer" class="checkbox noJSAutoUpdate" | |||
<?php if ($_['publicShareDisclaimerText'] !== null) print_unescaped('checked="checked"'); ?> /> |