mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
add enable2FactorAuthentication
This commit is contained in:
parent
303a114178
commit
825ef2898b
|
@ -40,6 +40,8 @@ class Settings { /* {{{ */
|
|||
var $_enableGuestLogin = false;
|
||||
// If you even want guest to be logged in automatically, set the following to true
|
||||
var $_enableGuestAutoLogin = false;
|
||||
// Set to true for 2-factor Authentication
|
||||
var $_enable2FactorAuthentication = false;
|
||||
// Allow users to reset their password
|
||||
var $_enablePasswordForgotten = false;
|
||||
// Minimum password strength (0 - x, 0 means no check)
|
||||
|
@ -446,6 +448,7 @@ class Settings { /* {{{ */
|
|||
$tab = $node[0]->attributes();
|
||||
$this->_enableGuestLogin = Settings::boolVal($tab["enableGuestLogin"]);
|
||||
$this->_enableGuestAutoLogin = Settings::boolVal($tab["enableGuestAutoLogin"]);
|
||||
$this->_enable2FactorAuthentication = Settings::boolVal($tab["enable2FactorAuthentication"]);
|
||||
$this->_enablePasswordForgotten = Settings::boolVal($tab["enablePasswordForgotten"]);
|
||||
$this->_passwordStrength = intval($tab["passwordStrength"]);
|
||||
$this->_passwordStrengthAlgorithm = strval($tab["passwordStrengthAlgorithm"]);
|
||||
|
@ -764,6 +767,7 @@ class Settings { /* {{{ */
|
|||
$node = $this->getXMLNode($xml, '/configuration/system', 'authentication');
|
||||
$this->setXMLAttributValue($node, "enableGuestLogin", $this->_enableGuestLogin);
|
||||
$this->setXMLAttributValue($node, "enableGuestAutoLogin", $this->_enableGuestAutoLogin);
|
||||
$this->setXMLAttributValue($node, "enable2FactorAuthentication", $this->_enable2FactorAuthentication);
|
||||
$this->setXMLAttributValue($node, "enablePasswordForgotten", $this->_enablePasswordForgotten);
|
||||
$this->setXMLAttributValue($node, "passwordStrength", $this->_passwordStrength);
|
||||
$this->setXMLAttributValue($node, "passwordStrengthAlgorithm", $this->_passwordStrengthAlgorithm);
|
||||
|
|
|
@ -112,6 +112,7 @@ if ($action == "saveSettings")
|
|||
// SETTINGS - SYSTEM - AUTHENTICATION
|
||||
$settings->_enableGuestLogin = getBoolValue("enableGuestLogin");
|
||||
$settings->_enableGuestAutoLogin = getBoolValue("enableGuestAutoLogin");
|
||||
$settings->_enable2FactorAuthentication = getBoolValue("enable2FactorAuthentication");
|
||||
$settings->_restricted = getBoolValue("restricted");
|
||||
$settings->_enableUserImage = getBoolValue("enableUserImage");
|
||||
$settings->_disableSelfEdit = getBoolValue("disableSelfEdit");
|
||||
|
|
|
@ -411,6 +411,10 @@ if(!is_writeable($settings->_configFilePath)) {
|
|||
<td><?php printMLText("settings_enableGuestAutoLogin");?>:</td>
|
||||
<td><input name="enableGuestAutoLogin" type="checkbox" <?php if ($settings->_enableGuestAutoLogin) echo "checked" ?> /></td>
|
||||
</tr>
|
||||
<tr title="<?php printMLText("settings_enable2FactorAuthentication");?>">
|
||||
<td><?php printMLText("settings_enable2FactorAuthentication");?>:</td>
|
||||
<td><input name="enable2FactorAuthentication" type="checkbox" <?php if ($settings->_enable2FactorAuthentication) echo "checked" ?> /></td>
|
||||
</tr>
|
||||
<tr title="<?php printMLText("settings_restricted_desc");?>">
|
||||
<td><?php printMLText("settings_restricted");?>:</td>
|
||||
<td><input name="restricted" type="checkbox" <?php if ($settings->_restricted) echo "checked" ?> /></td>
|
||||
|
|
Loading…
Reference in New Issue
Block a user