aboutsummaryrefslogtreecommitdiff
path: root/controller/guicontroller.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2014-09-27 11:09:44 +0200
committerChristian Weiske <cweiske@cweiske.de>2014-09-27 11:09:44 +0200
commit0244b5bc748d26e8222a9d9fba73484d7b483875 (patch)
tree59d0aeb03356bae242b34eaf4342dc709cc5283c /controller/guicontroller.php
parent497af90eabe1e4a89c1ecfe0ebb9c874dd67b648 (diff)
downloadgrauphel-0244b5bc748d26e8222a9d9fba73484d7b483875.tar.gz
grauphel-0244b5bc748d26e8222a9d9fba73484d7b483875.zip
Add token management page (only shows tokens for now)
Diffstat (limited to 'controller/guicontroller.php')
-rw-r--r--controller/guicontroller.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/controller/guicontroller.php b/controller/guicontroller.php
index 1a4d023..3c9c6f1 100644
--- a/controller/guicontroller.php
+++ b/controller/guicontroller.php
@@ -15,6 +15,7 @@ namespace OCA\Grauphel\Controller;
use \OCP\AppFramework\Controller;
use \OCP\AppFramework\Http\TemplateResponse;
+use \OCA\Grauphel\Lib\TokenStorage;
/**
* Owncloud frontend
@@ -93,6 +94,28 @@ class GuiController extends Controller
return $res;
}
+ /**
+ * Show access tokens
+ *
+ * @NoAdminRequired
+ * @NoCSRFRequired
+ */
+ public function tokens()
+ {
+ $tokens = new TokenStorage();
+ $res = new TemplateResponse('grauphel', 'tokens');
+ $res->setParams(
+ array(
+ 'tokens' => $tokens->loadForUser(
+ $this->user->getUid(), 'access'
+ )
+ )
+ );
+ $this->addNavigation($res, $rawtag);
+
+ return $res;
+ }
+
protected function addNavigation(TemplateResponse $res, $selectedRawtag = null)
{
$nav = new \OCP\Template('grauphel', 'appnavigation', '');