added quota for users

This commit is contained in:
steinm 2012-12-19 10:05:34 +00:00
parent b17bf99805
commit 1ded3a8ee8
4 changed files with 14 additions and 1 deletions

View File

@ -50,6 +50,8 @@ class Settings { /* {{{ */
var $_passwordHistory = 10;
// Number of failed logins before account is disabled
var $_loginFailure = 0;
// maximum amount of bytes a user may consume, 0 = unlimited
var $_quota = 0;
// Restricted access: only allow users to log in if they have an entry in
// the local database (irrespective of successful authentication with LDAP).
var $_restricted = true;
@ -324,6 +326,7 @@ class Settings { /* {{{ */
$this->_passwordExpiration = intval($tab["passwordExpiration"]);
$this->_passwordHistory = intval($tab["passwordHistory"]);
$this->_loginFailure = intval($tab["loginFailure"]);
$this->_quota = intval($tab["quota"]);
$this->_encryptionKey = strval($tab["encryptionKey"]);
$this->_restricted = Settings::boolVal($tab["restricted"]);
$this->_enableUserImage = Settings::boolVal($tab["enableUserImage"]);
@ -563,6 +566,7 @@ class Settings { /* {{{ */
$this->setXMLAttributValue($node, "passwordExpiration", $this->_passwordExpiration);
$this->setXMLAttributValue($node, "passwordHistory", $this->_passwordHistory);
$this->setXMLAttributValue($node, "loginFailure", $this->_loginFailure);
$this->setXMLAttributValue($node, "quota", $this->_quota);
$this->setXMLAttributValue($node, "encryptionKey", $this->_encryptionKey);
$this->setXMLAttributValue($node, "restricted", $this->_restricted);
$this->setXMLAttributValue($node, "enableUserImage", $this->_enableUserImage);

View File

@ -99,6 +99,7 @@ if ($action == "saveSettings")
$settings->_passwordExpiration = intval($_POST["passwordExpiration"]);
$settings->_passwordHistory = intval($_POST["passwordHistory"]);
$settings->_loginFailure = intval($_POST["loginFailure"]);
$settings->_quota = intval($_POST["quota"]);
$settings->_encryptionKey = strval($_POST["encryptionKey"]);
// TODO Connectors
@ -156,6 +157,6 @@ if ($action == "saveSettings")
}
header("Location:../out/out.AdminTools.php");
header("Location:../out/out.Settings.php");
?>

View File

@ -320,6 +320,10 @@ if(!is_writeable($settings->_configFilePath)) {
<td><?php printMLText("settings_loginFailure");?>:</td>
<td><input name="loginFailure" value="<?php echo $settings->_loginFailure; ?>" size="2" /></td>
</tr>
<tr title="<?php printMLText("settings_quota_desc");?>">
<td><?php printMLText("settings_quota");?>:</td>
<td><input type="text" name="quota" value="<?php echo $settings->_quota; ?>" size="2" /></td>
</tr>
<tr title="<?php printMLText("settings_encryptionKey_desc");?>">
<td><?php printMLText("settings_encryptionKey");?>:</td>
<td><input name="encryptionKey" value="<?php echo $settings->_encryptionKey; ?>" size="32" /></td>

View File

@ -308,6 +308,10 @@ if(!is_writeable($settings->_configFilePath)) {
<td><?php printMLText("settings_loginFailure");?>:</td>
<td><input type="text" name="loginFailure" value="<?php echo $settings->_loginFailure; ?>" size="2" /></td>
</tr>
<tr title="<?php printMLText("settings_quota_desc");?>">
<td><?php printMLText("settings_quota");?>:</td>
<td><input type="text" name="quota" value="<?php echo $settings->_quota; ?>" size="2" /></td>
</tr>
<tr title="<?php printMLText("settings_encryptionKey_desc");?>">
<td><?php printMLText("settings_encryptionKey");?>:</td>
<td><input type="text" name="encryptionKey" value="<?php echo $settings->_encryptionKey; ?>" size="32" /></td>