From 23112470644b6a8b4bfc573a49fe01e5fba64336 Mon Sep 17 00:00:00 2001 From: brantje Date: Sat, 1 Oct 2016 19:26:58 +0200 Subject: [PATCH] Add public share page --- appinfo/routes.php | 1 + controller/pagecontroller.php | 11 ++++++++++- templates/public_share.php | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 templates/public_share.php diff --git a/appinfo/routes.php b/appinfo/routes.php index f9382742..517466c6 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -21,6 +21,7 @@ return [ 'routes' => [ ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'], ['name' => 'page#bookmarklet', 'url' => '/bookmarklet', 'verb' => 'GET'], + ['name' => 'page#publicSharePage', 'url' => '/share/public', 'verb' => 'GET'], //Vault ['name' => 'vault#listVaults', 'url' => '/api/v2/vaults', 'verb' => 'GET'], diff --git a/controller/pagecontroller.php b/controller/pagecontroller.php index 1520cd02..c93482f6 100644 --- a/controller/pagecontroller.php +++ b/controller/pagecontroller.php @@ -48,7 +48,16 @@ class PageController extends Controller { */ public function bookmarklet($url='',$title='') { $params = array('url' => $url, 'label' => $title); - return new TemplateResponse('passman', 'bookmarklet', $params); + + } + + /** + * @NoAdminRequired + * @NoCSRFRequired + * @PublicPage + */ + public function publicSharePage($shareKey) { + return new TemplateResponse('passman', 'public_share'); } } \ No newline at end of file diff --git a/templates/public_share.php b/templates/public_share.php new file mode 100644 index 00000000..95c0c0e2 --- /dev/null +++ b/templates/public_share.php @@ -0,0 +1 @@ +Public shared credential \ No newline at end of file