diff --git a/views/bootstrap/class.UsrMgr.php b/views/bootstrap/class.UsrMgr.php index 9c0d2180d..9547f7ff7 100644 --- a/views/bootstrap/class.UsrMgr.php +++ b/views/bootstrap/class.UsrMgr.php @@ -249,13 +249,52 @@ $(document).ready( function() { $this->showUserForm($seluser); } /* }}} */ - function apikeys() { /* {{{ */ + function formapikeys() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $seluser = $this->params['seluser']; + if($seluser) { ?> -Hier die api keys +
+ + +formField( + getMLText("apikey"), + array( + 'element'=>'input', + 'type'=>'text', + 'id'=>'apikey', + 'name'=>'apikey', + 'value'=>md5(uniqid(time())), + ) + ); + $this->formSubmit(" ".getMLText($seluser ? "save" : "add_apikey")); + } + } /* }}} */ + + function listapikeys() { /* {{{ */ + $dms = $this->params['dms']; + $user = $this->params['user']; + $seluser = $this->params['seluser']; + + $apikeys = SeedDMS_Core_ApiKey::getAllInstances('expires', $dms); + if($apikeys) { + echo $this->contentHeading(getMLText('apikeys')); + echo "\n"; + echo ""; + echo ""; + echo ""; + foreach($apikeys as $apikey) { + echo ""; + echo ""; + echo ""; + } + echo "
".getMLText('apikey')."
".$apikey->getApiKey()."
"; + } } /* }}} */ function showUserForm($currUser) { /* {{{ */ @@ -698,9 +737,18 @@ Hier die api keys
getID()."\"" : "") ?>>
- columnEnd(); - $this->rowEnd(); + contentContainerEnd(); ?> + +
+check_view_access($this, array('action'=>'formapikeys'))) { ?> +
getID()."\"" : "") ?>>
+ +check_view_access($this, array('action'=>'listapikeys'))) { ?> +
getID()."\"" : "") ?>>
+ +
+ +contentEnd(); $this->htmlEndPage(); } /* }}} */