Commit 8bd37aa6 authored by Timo Benk's avatar Timo Benk
Browse files

endorseLinkPassword changed to enableLinkPasswordByDefault

parent 9601ef2c
......@@ -64,8 +64,8 @@ $outgoingServer2serverShareEnabled = $config->getAppValue('files_sharing', 'outg
$countOfDataLocation = 0;
$value = $config->getAppValue('core', 'shareapi_endorse_links_password', 'no');
$endorsePasswordForPublicLink = ($value === 'yes') ? true :false;
$value = $config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no');
$enableLinkPasswordByDefault = ($value === 'yes') ? true : false;
$dataLocation = str_replace(OC::$SERVERROOT .'/', '', $config->getSystemValue('datadirectory', ''), $countOfDataLocation);
if($countOfDataLocation !== 1 || !OC_User::isAdminUser(OC_User::getUser())){
......@@ -162,7 +162,7 @@ $array = [
'defaultExpireDate' => $defaultExpireDate,
'defaultExpireDateEnforced' => $enforceDefaultExpireDate,
'enforcePasswordForPublicLink' => \OCP\Util::isPublicLinkPasswordRequired(),
'endorsePasswordForPublicLink' => $endorsePasswordForPublicLink,
'enableLinkPasswordByDefault' => $enableLinkPasswordByDefault,
'sharingDisabledForUser' => \OCP\Util::isSharingDisabledForUser(),
'resharingAllowed' => \OCP\Share::isResharingAllowed(),
'remoteShareAllowed' => $outgoingServer2serverShareEnabled,
......
......@@ -22,7 +22,7 @@
defaults: {
publicUploadEnabled: false,
enforcePasswordForPublicLink: oc_appconfig.core.enforcePasswordForPublicLink,
endorsePasswordForPublicLink: oc_appconfig.core.endorsePasswordForPublicLink,
enableLinkPasswordByDefault: oc_appconfig.core.enableLinkPasswordByDefault,
isDefaultExpireDateEnforced: oc_appconfig.core.defaultExpireDateEnforced === true,
isDefaultExpireDateEnabled: oc_appconfig.core.defaultExpireDateEnabled === true,
isRemoteShareAllowed: oc_appconfig.core.remoteShareAllowed,
......
......@@ -157,7 +157,7 @@
}
if($checkBox.is(':checked')) {
if(this.configModel.get('enforcePasswordForPublicLink') === false && this.configModel.get('endorsePasswordForPublicLink') === false) {
if(this.configModel.get('enforcePasswordForPublicLink') === false && this.configModel.get('enableLinkPasswordByDefault') === false) {
$loading.removeClass('hidden');
// this will create it
this.model.saveLinkShare();
......
......@@ -134,7 +134,7 @@ $template->assign('suggestedOverwriteCliUrl', $suggestedOverwriteCliUrl);
$template->assign('allowLinks', $appConfig->getValue('core', 'shareapi_allow_links', 'yes'));
$template->assign('enforceLinkPassword', \OCP\Util::isPublicLinkPasswordRequired());
$template->assign('endorseLinkPassword', $appConfig->getValue('core', 'shareapi_endorse_links_password', 'no'));
$template->assign('enableLinkPasswordByDefault', $appConfig->getValue('core', 'shareapi_enable_link_password_by_default', 'no'));
$template->assign('allowPublicUpload', $appConfig->getValue('core', 'shareapi_allow_public_upload', 'yes'));
$template->assign('allowResharing', $appConfig->getValue('core', 'shareapi_allow_resharing', 'yes'));
$template->assign('allowPublicMailNotification', $appConfig->getValue('core', 'shareapi_allow_public_notification', 'no'));
......
......@@ -221,9 +221,9 @@ if ($_['cronErrors']) {
value="1" <?php if ($_['allowPublicUpload'] == 'yes') print_unescaped('checked="checked"'); ?> />
<label for="allowPublicUpload"><?php p($l->t('Allow public uploads'));?></label><br/>
<input type="checkbox" name="shareapi_endorse_links_password" id="endorseLinkPassword" class="checkbox"
value="1" <?php if ($_['endorseLinkPassword'] === 'yes') print_unescaped('checked="checked"'); ?> />
<label for="endorseLinkPassword"><?php p($l->t('Endorse password protection'));?></label><br/>
<input type="checkbox" name="shareapi_enable_link_password_by_default" id="enableLinkPasswordByDefault" class="checkbox"
value="1" <?php if ($_['enableLinkPasswordByDefault'] === 'yes') print_unescaped('checked="checked"'); ?> />
<label for="enableLinkPasswordByDefault"><?php p($l->t('Enable password by default for link shares'));?></label><br/>
<input type="checkbox" name="shareapi_enforce_links_password" id="enforceLinkPassword" class="checkbox"
value="1" <?php if ($_['enforceLinkPassword']) print_unescaped('checked="checked"'); ?> />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment