add defaultAccessDocs

This commit is contained in:
Uwe Steinmann 2017-01-18 20:58:03 +01:00
parent 034977db87
commit 88c06c2f37
3 changed files with 16 additions and 0 deletions

View File

@ -64,6 +64,8 @@ class Settings { /* {{{ */
var $_encryptionKey = '';
// lifetime of cookie in seconds or 0 for end of session
var $_cookieLifetime = '';
// default access mode for documents
var $_defaultAccessDocs = '';
// Strict form checking
var $_strictFormCheck = false;
// Path to where SeedDMS is located
@ -454,6 +456,7 @@ class Settings { /* {{{ */
$this->_undelUserIds = strval($tab["undelUserIds"]);
$this->_encryptionKey = strval($tab["encryptionKey"]);
$this->_cookieLifetime = intval($tab["cookieLifetime"]);
$this->_defaultAccessDocs = intval($tab["defaultAccessDocs"]);
$this->_restricted = Settings::boolVal($tab["restricted"]);
$this->_enableUserImage = Settings::boolVal($tab["enableUserImage"]);
$this->_disableSelfEdit = Settings::boolVal($tab["disableSelfEdit"]);
@ -753,6 +756,7 @@ class Settings { /* {{{ */
$this->setXMLAttributValue($node, "undelUserIds", $this->_undelUserIds);
$this->setXMLAttributValue($node, "encryptionKey", $this->_encryptionKey);
$this->setXMLAttributValue($node, "cookieLifetime", $this->_cookieLifetime);
$this->setXMLAttributValue($node, "defaultAccessDocs", $this->_defaultAccessDocs);
$this->setXMLAttributValue($node, "restricted", $this->_restricted);
$this->setXMLAttributValue($node, "enableUserImage", $this->_enableUserImage);
$this->setXMLAttributValue($node, "disableSelfEdit", $this->_disableSelfEdit);

View File

@ -127,6 +127,7 @@ if ($action == "saveSettings")
$settings->_undelUserIds = strval($_POST["undelUserIds"]);
$settings->_encryptionKey = strval($_POST["encryptionKey"]);
$settings->_cookieLifetime = intval($_POST["cookieLifetime"]);
$settings->_defaultAccessDocs = intval($_POST["defaultAccessDocs"]);
// TODO Connectors

View File

@ -459,6 +459,17 @@ if(!is_writeable($settings->_configFilePath)) {
<td><?php printMLText("settings_cookieLifetime");?>:</td>
<td><?php $this->showTextField("cookieLifetime", $settings->_cookieLifetime); ?></td>
</tr>
<tr title="<?php printMLText("settings_defaultAccessDocs_desc");?>">
<td><?php printMLText("settings_defaultAccessDocs");?>:</td>
<td>
<select name="defaultAccessDocs">
<option value="0" <?php if ($settings->_defaultAccessDocs==0) echo "selected" ?>><?php printMLText("inherited");?></option>
<option value="<?php echo M_NONE; ?>" <?php if ($settings->_defaultAccessDocs==M_NONE) echo "selected" ?>><?php printMLText("access_mode_none");?></option>
<option value="<?php echo M_READ; ?>" <?php if ($settings->_defaultAccessDocs==M_READ) echo "selected" ?>><?php printMLText("access_mode_read");?></option>
<option value="<?php echo M_READWRITE; ?>" <?php if ($settings->_defaultAccessDocs==M_READWRITE) echo "selected" ?>><?php printMLText("access_mode_readwrite");?></option>
</select>
</td>
</tr>
<!-- TODO Connectors -->