mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 05:31:42 +00:00
add option to disable setting a password
This commit is contained in:
parent
c51088a3b6
commit
95372d6905
|
@ -47,6 +47,8 @@ class Settings { /* {{{ */
|
||||||
var $_enableGuestAutoLogin = false;
|
var $_enableGuestAutoLogin = false;
|
||||||
// Allow users to reset their password
|
// Allow users to reset their password
|
||||||
var $_enablePasswordForgotten = false;
|
var $_enablePasswordForgotten = false;
|
||||||
|
// Do not allow users to change password
|
||||||
|
var $_disableChangePassword = false;
|
||||||
// Minimum password strength (0 - x, 0 means no check)
|
// Minimum password strength (0 - x, 0 means no check)
|
||||||
var $_passwordStrength = 0;
|
var $_passwordStrength = 0;
|
||||||
// Password strength algorithm (simple, advanced)
|
// Password strength algorithm (simple, advanced)
|
||||||
|
@ -627,6 +629,7 @@ class Settings { /* {{{ */
|
||||||
$this->_restricted = Settings::boolVal($tab["restricted"]);
|
$this->_restricted = Settings::boolVal($tab["restricted"]);
|
||||||
$this->_enableUserImage = Settings::boolVal($tab["enableUserImage"]);
|
$this->_enableUserImage = Settings::boolVal($tab["enableUserImage"]);
|
||||||
$this->_disableSelfEdit = Settings::boolVal($tab["disableSelfEdit"]);
|
$this->_disableSelfEdit = Settings::boolVal($tab["disableSelfEdit"]);
|
||||||
|
$this->_disableChangePassword = Settings::boolVal($tab["disableChangePassword"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// XML Path: /configuration/system/authentication/connectors/connector
|
// XML Path: /configuration/system/authentication/connectors/connector
|
||||||
|
@ -998,6 +1001,7 @@ class Settings { /* {{{ */
|
||||||
$this->setXMLAttributValue($node, "restricted", $this->_restricted);
|
$this->setXMLAttributValue($node, "restricted", $this->_restricted);
|
||||||
$this->setXMLAttributValue($node, "enableUserImage", $this->_enableUserImage);
|
$this->setXMLAttributValue($node, "enableUserImage", $this->_enableUserImage);
|
||||||
$this->setXMLAttributValue($node, "disableSelfEdit", $this->_disableSelfEdit);
|
$this->setXMLAttributValue($node, "disableSelfEdit", $this->_disableSelfEdit);
|
||||||
|
$this->setXMLAttributValue($node, "disableChangePassword", $this->_disableChangePassword);
|
||||||
|
|
||||||
// XML Path: /configuration/system/authentication/connectors
|
// XML Path: /configuration/system/authentication/connectors
|
||||||
foreach($this->_usersConnectors as $keyConn => $paramConn)
|
foreach($this->_usersConnectors as $keyConn => $paramConn)
|
||||||
|
|
|
@ -196,6 +196,7 @@ if ($action == "saveSettings")
|
||||||
setBoolValue("restricted");
|
setBoolValue("restricted");
|
||||||
setBoolValue("enableUserImage");
|
setBoolValue("enableUserImage");
|
||||||
setBoolValue("disableSelfEdit");
|
setBoolValue("disableSelfEdit");
|
||||||
|
setBoolValue("disableChangePassword");
|
||||||
setBoolValue("enablePasswordForgotten");
|
setBoolValue("enablePasswordForgotten");
|
||||||
setIntValue("passwordStrength");
|
setIntValue("passwordStrength");
|
||||||
setStrValue("passwordStrengthAlgorithm");
|
setStrValue("passwordStrengthAlgorithm");
|
||||||
|
|
|
@ -48,6 +48,7 @@ if($view) {
|
||||||
$view->setParam('enablelanguageselector', $settings->_enableLanguageSelector);
|
$view->setParam('enablelanguageselector', $settings->_enableLanguageSelector);
|
||||||
$view->setParam('enablethemeselector', $settings->_enableThemeSelector);
|
$view->setParam('enablethemeselector', $settings->_enableThemeSelector);
|
||||||
$view->setParam('passwordstrength', $settings->_passwordStrength);
|
$view->setParam('passwordstrength', $settings->_passwordStrength);
|
||||||
|
$view->setParam('disablechangepassword', $settings->_disableChangePassword);
|
||||||
$view->setParam('httproot', $settings->_httpRoot);
|
$view->setParam('httproot', $settings->_httpRoot);
|
||||||
$view->setParam('accessobject', $accessop);
|
$view->setParam('accessobject', $accessop);
|
||||||
$view($_GET);
|
$view($_GET);
|
||||||
|
|
|
@ -75,6 +75,7 @@ $(document).ready( function() {
|
||||||
$enablelanguageselector = $this->params['enablelanguageselector'];
|
$enablelanguageselector = $this->params['enablelanguageselector'];
|
||||||
$enablethemeselector = $this->params['enablethemeselector'];
|
$enablethemeselector = $this->params['enablethemeselector'];
|
||||||
$passwordstrength = $this->params['passwordstrength'];
|
$passwordstrength = $this->params['passwordstrength'];
|
||||||
|
$disablechangepassword = $this->params['disablechangepassword'];
|
||||||
$httproot = $this->params['httproot'];
|
$httproot = $this->params['httproot'];
|
||||||
|
|
||||||
$this->htmlAddHeader('<script type="text/javascript" src="../views/'.$this->theme.'/vendors/jquery-validation/jquery.validate.js"></script>'."\n", 'js');
|
$this->htmlAddHeader('<script type="text/javascript" src="../views/'.$this->theme.'/vendors/jquery-validation/jquery.validate.js"></script>'."\n", 'js');
|
||||||
|
@ -102,6 +103,7 @@ $(document).ready( function() {
|
||||||
'required'=>true
|
'required'=>true
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
if(!$disablechangepassword) {
|
||||||
$this->formField(
|
$this->formField(
|
||||||
getMLText("new_password"),
|
getMLText("new_password"),
|
||||||
'<input class="form-control pwd" type="password" rel="strengthbar" id="pwd" name="pwd" size="30">'
|
'<input class="form-control pwd" type="password" rel="strengthbar" id="pwd" name="pwd" size="30">'
|
||||||
|
@ -122,6 +124,7 @@ $(document).ready( function() {
|
||||||
'autocomplete'=>'off',
|
'autocomplete'=>'off',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
$this->formField(
|
$this->formField(
|
||||||
getMLText("name"),
|
getMLText("name"),
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -437,6 +437,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
<?php $this->showConfigCheckbox('settings_restricted', 'restricted'); ?>
|
<?php $this->showConfigCheckbox('settings_restricted', 'restricted'); ?>
|
||||||
<?php $this->showConfigCheckbox('settings_enableUserImage', 'enableUserImage'); ?>
|
<?php $this->showConfigCheckbox('settings_enableUserImage', 'enableUserImage'); ?>
|
||||||
<?php $this->showConfigCheckbox('settings_disableSelfEdit', 'disableSelfEdit'); ?>
|
<?php $this->showConfigCheckbox('settings_disableSelfEdit', 'disableSelfEdit'); ?>
|
||||||
|
<?php $this->showConfigCheckbox('settings_disableChangePassword', 'disableChangePassword'); ?>
|
||||||
<?php $this->showConfigCheckbox('settings_enablePasswordForgotten', 'enablePasswordForgotten'); ?>
|
<?php $this->showConfigCheckbox('settings_enablePasswordForgotten', 'enablePasswordForgotten'); ?>
|
||||||
<?php $this->showConfigText('settings_passwordStrength', 'passwordStrength'); ?>
|
<?php $this->showConfigText('settings_passwordStrength', 'passwordStrength'); ?>
|
||||||
<?php $this->showConfigOption('settings_passwordStrengthAlgorithm', 'passwordStrengthAlgorithm', array('simple'=>'settings_passwordStrengthAlgorithm_valsimple', 'advanced'=>'settings_passwordStrengthAlgorithm_valadvanced'), false, true); ?>
|
<?php $this->showConfigOption('settings_passwordStrengthAlgorithm', 'passwordStrengthAlgorithm', array('simple'=>'settings_passwordStrengthAlgorithm_valsimple', 'advanced'=>'settings_passwordStrengthAlgorithm_valadvanced'), false, true); ?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user