FS#3641 - Add option to disable the password reset function
| | |
| | | $error = '<div class="box box_error"><h1>Error</h1>'.$error.'</div>'; |
| | | } |
| | | |
| | | $app->load('getconf'); |
| | | |
| | | $security_config = $app->getconf->get_security_config('permissions'); |
| | | if($security_config['password_reset_allowed'] == 'yes') { |
| | | $app->tpl->setVar('pw_lost_show', 1); |
| | | } else { |
| | | $app->tpl->setVar('pw_lost_show', 0); |
| | | } |
| | | |
| | | $app->tpl->setVar('error', $error); |
| | | $app->tpl->setVar('pw_lost_txt', $app->lng('pw_lost_txt')); |
| | | $app->tpl->setVar('username_txt', $app->lng('username_txt')); |
| | |
| | | require_once '../../lib/config.inc.php'; |
| | | require_once '../../lib/app.inc.php'; |
| | | |
| | | $app->load('getconf'); |
| | | |
| | | $security_config = $app->getconf->get_security_config('permissions'); |
| | | if($security_config['password_reset_allowed'] != 'yes') die('Password reset function has been disabled.'); |
| | | |
| | | // Loading the template |
| | | $app->uses('tpl'); |
| | | $app->tpl->newTemplate("form.tpl.htm"); |
| | |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoKey" type="button" value="{tmpl_var name='add_new_record_txt'}" onclick="submitLoginForm('pageForm');"><span>{tmpl_var name='login_button_txt'}</span></button> |
| | | <button class="negative iconstxt icoKey" type="button" value="{tmpl_var name='pw_lost_txt'}" onclick="loadContent('login/password_reset.php');"><span>{tmpl_var name='pw_lost_txt'}</span></button> |
| | | <tmpl_if name="pw_lost_show"><button class="negative iconstxt icoKey" type="button" value="{tmpl_var name='pw_lost_txt'}" onclick="loadContent('login/password_reset.php');"><span>{tmpl_var name='pw_lost_txt'}</span></button></tmpl_if> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | Options: yes/no |
| | | Description: Disables the remote API |
| | | |
| | | Setting: password_reset_allowed |
| | | Options: yes/no |
| | | Description: Disables the password reset function. |
| | | |
| | | Setting: ids_enabled |
| | | Options: yes/no |
| | | Description: Enables the Intrusion Detection System |
| | |
| | | admin_allow_software_packages=superadmin |
| | | admin_allow_software_repo=superadmin |
| | | remote_api_allowed=yes |
| | | password_reset_allowed=yes |
| | | |
| | | [ids] |
| | | ids_enabled=yes |