diff options
author | brantje <brantje@gmail.com> | 2016-09-09 18:36:35 +0300 |
---|---|---|
committer | brantje <brantje@gmail.com> | 2016-09-09 18:36:35 +0300 |
commit | 3e68a3eccc5e3375f62441bdbe9fa3672e7c0668 (patch) | |
tree | 53b72e419fb5a00a0705206b267778b6f7b3339c /controller | |
parent | 82811515a14601bb44d2faf9ca672a431c618e9a (diff) |
Initial commit
Diffstat (limited to 'controller')
-rw-r--r-- | controller/credentialcontroller.php | 56 | ||||
-rw-r--r-- | controller/filecontroller.php | 44 | ||||
-rw-r--r-- | controller/pagecontroller.php | 43 | ||||
-rw-r--r-- | controller/revisioncontroller.php | 43 | ||||
-rw-r--r-- | controller/vaultcontroller.php | 56 |
5 files changed, 242 insertions, 0 deletions
diff --git a/controller/credentialcontroller.php b/controller/credentialcontroller.php new file mode 100644 index 00000000..fc2324f5 --- /dev/null +++ b/controller/credentialcontroller.php @@ -0,0 +1,56 @@ +<?php +/** + * Nextcloud - passman + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Sander Brand <brantje@gmail.com> + * @copyright Sander Brand 2016 + */ + +namespace OCA\Passman\Controller; + +use OCP\IRequest; +use OCP\AppFramework\Http\TemplateResponse; +use OCP\AppFramework\Http\DataResponse; +use OCP\AppFramework\Controller; + +class CredentialController extends Controller { + + + private $userId; + + public function __construct($AppName, IRequest $request, $UserId){ + parent::__construct($AppName, $request); + $this->userId = $UserId; + } + + /** + * @NoAdminRequired + */ + public function create() { + return; + } + + /** + * @NoAdminRequired + */ + public function get() { + return; + } + + /** + * @NoAdminRequired + */ + public function update() { + return; + } + + /** + * @NoAdminRequired + */ + public function delete() { + return; + } +}
\ No newline at end of file diff --git a/controller/filecontroller.php b/controller/filecontroller.php new file mode 100644 index 00000000..d42426b8 --- /dev/null +++ b/controller/filecontroller.php @@ -0,0 +1,44 @@ +<?php +/** + * Nextcloud - passman + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Sander Brand <brantje@gmail.com> + * @copyright Sander Brand 2016 + */ + +namespace OCA\Passman\Controller; + +use OCP\IRequest; +use OCP\AppFramework\Http\TemplateResponse; +use OCP\AppFramework\Http\DataResponse; +use OCP\AppFramework\Controller; + +class FileController extends Controller { + + + private $userId; + + public function __construct($AppName, IRequest $request, $UserId){ + parent::__construct($AppName, $request); + $this->userId = $UserId; + } + + + /** + * @NoAdminRequired + */ + public function upload() { + return; + } + + + /** + * @NoAdminRequired + */ + public function delete() { + return; + } +}
\ No newline at end of file diff --git a/controller/pagecontroller.php b/controller/pagecontroller.php new file mode 100644 index 00000000..e6851c1a --- /dev/null +++ b/controller/pagecontroller.php @@ -0,0 +1,43 @@ +<?php +/** + * Nextcloud - passman + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Sander Brand <brantje@gmail.com> + * @copyright Sander Brand 2016 + */ + +namespace OCA\Passman\Controller; + +use OCP\IRequest; +use OCP\AppFramework\Http\TemplateResponse; +use OCP\AppFramework\Http\DataResponse; +use OCP\AppFramework\Controller; + +class PageController extends Controller { + + + private $userId; + + public function __construct($AppName, IRequest $request, $UserId){ + parent::__construct($AppName, $request); + $this->userId = $UserId; + } + + /** + * CAUTION: the @Stuff turns off security checks; for this page no admin is + * required and no CSRF check. If you don't know what CSRF is, read + * it up in the docs or you might create a security hole. This is + * basically the only required method to add this exemption, don't + * add it to any other method if you don't exactly know what it does + * + * @NoAdminRequired + * @NoCSRFRequired + */ + public function index() { + $params = ['user' => $this->userId]; + return new TemplateResponse('passman', 'main', $params); // templates/main.php + } +}
\ No newline at end of file diff --git a/controller/revisioncontroller.php b/controller/revisioncontroller.php new file mode 100644 index 00000000..460da18a --- /dev/null +++ b/controller/revisioncontroller.php @@ -0,0 +1,43 @@ +<?php +/** + * Nextcloud - passman + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Sander Brand <brantje@gmail.com> + * @copyright Sander Brand 2016 + */ + +namespace OCA\Passman\Controller; + +use OCP\IRequest; +use OCP\AppFramework\Http\TemplateResponse; +use OCP\AppFramework\Http\DataResponse; +use OCP\AppFramework\Controller; + +class RevisionController extends Controller { + + + private $userId; + + public function __construct($AppName, IRequest $request, $UserId){ + parent::__construct($AppName, $request); + $this->userId = $UserId; + } + + /** + * @NoAdminRequired + */ + public function get() { + return; + } + + + /** + * @NoAdminRequired + */ + public function delete() { + return; + } +}
\ No newline at end of file diff --git a/controller/vaultcontroller.php b/controller/vaultcontroller.php new file mode 100644 index 00000000..741e38ba --- /dev/null +++ b/controller/vaultcontroller.php @@ -0,0 +1,56 @@ +<?php +/** + * Nextcloud - passman + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Sander Brand <brantje@gmail.com> + * @copyright Sander Brand 2016 + */ + +namespace OCA\Passman\Controller; + +use OCP\IRequest; +use OCP\AppFramework\Http\TemplateResponse; +use OCP\AppFramework\Http\DataResponse; +use OCP\AppFramework\Controller; + +class VaultController extends Controller { + + + private $userId; + + public function __construct($AppName, IRequest $request, $UserId) { + parent::__construct($AppName, $request); + $this->userId = $UserId; + } + + /** + * @NoAdminRequired + */ + public function create() { + return; + } + + /** + * @NoAdminRequired + */ + public function get() { + return; + } + + /** + * @NoAdminRequired + */ + public function update() { + return; + } + + /** + * @NoAdminRequired + */ + public function delete() { + return; + } +}
\ No newline at end of file |