mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 16:35:38 +00:00
add configuration for authentication by key in rest api
This commit is contained in:
parent
0429815c78
commit
7725a0b03b
|
@ -68,6 +68,12 @@ class Settings { /* {{{ */
|
|||
var $_cookieLifetime = '';
|
||||
// default access mode for documents
|
||||
var $_defaultAccessDocs = '';
|
||||
// api key for restapi
|
||||
var $_apiKey = '';
|
||||
// api user id for restapi
|
||||
var $_apiUserId = 0;
|
||||
// api allowed origins for restapi
|
||||
var $_apiOrigin = '';
|
||||
// Strict form checking
|
||||
var $_strictFormCheck = false;
|
||||
// list of form fields which are visible by default but can be explixitly
|
||||
|
@ -656,6 +662,9 @@ class Settings { /* {{{ */
|
|||
$tab = $node[0]->attributes();
|
||||
$this->_guestID = intval($tab["guestID"]);
|
||||
$this->_adminIP = strval($tab["adminIP"]);
|
||||
$this->_apiKey = strval($tab["apiKey"]);
|
||||
$this->_apiUserId = intval($tab["apiUserId"]);
|
||||
$this->_apiOrigin = strval($tab["apiOrigin"]);
|
||||
}
|
||||
|
||||
// XML Path: /configuration/advanced/edition
|
||||
|
@ -985,6 +994,9 @@ class Settings { /* {{{ */
|
|||
$node = $this->getXMLNode($xml, '/configuration/advanced', 'authentication');
|
||||
$this->setXMLAttributValue($node, "guestID", $this->_guestID);
|
||||
$this->setXMLAttributValue($node, "adminIP", $this->_adminIP);
|
||||
$this->setXMLAttributValue($node, "apiKey", $this->_apiKey);
|
||||
$this->setXMLAttributValue($node, "apiUserId", $this->_apiUserId);
|
||||
$this->setXMLAttributValue($node, "apiOrigin", $this->_apiOrigin);
|
||||
|
||||
// XML Path: /configuration/advanced/edition
|
||||
$node = $this->getXMLNode($xml, '/configuration/advanced', 'edition');
|
||||
|
|
|
@ -181,6 +181,9 @@ if ($action == "saveSettings")
|
|||
// SETTINGS - ADVANCED - AUTHENTICATION
|
||||
$settings->_guestID = intval($_POST["guestID"]);
|
||||
$settings->_adminIP = $_POST["adminIP"];
|
||||
$settings->_apiKey = strval($_POST["apiKey"]);
|
||||
$settings->_apiUserId = intval($_POST["apiUserId"]);
|
||||
$settings->_apiOrigin = strval($_POST["apiOrigin"]);
|
||||
|
||||
// SETTINGS - ADVANCED - EDITION
|
||||
$settings->_versioningFileName = $_POST["versioningFileName"];
|
||||
|
|
|
@ -421,6 +421,9 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
|
|||
<?php $this->showConfigHeadline('settings_Authentication'); ?>
|
||||
<?php $this->showConfigText('settings_guestID', 'guestID'); ?>
|
||||
<?php $this->showConfigText('settings_adminIP', 'adminIP'); ?>
|
||||
<?php $this->showConfigText('settings_apiKey', 'apiKey'); ?>
|
||||
<?php $this->showConfigText('settings_apiUserId', 'apiUserId'); ?>
|
||||
<?php $this->showConfigText('settings_apiOrigin', 'apiOrigin'); ?>
|
||||
|
||||
<!--
|
||||
-- SETTINGS - ADVANCED - EDITION
|
||||
|
|
Loading…
Reference in New Issue
Block a user