From 0269aefc30d65ddb5d197bac7819feed5bf78de8 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sat, 23 Aug 2014 13:08:33 +0200 Subject: Manually backported Wsat --- framework/Wsat/pages/layout/TWsatLayout.php | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 framework/Wsat/pages/layout/TWsatLayout.php (limited to 'framework/Wsat/pages/layout/TWsatLayout.php') diff --git a/framework/Wsat/pages/layout/TWsatLayout.php b/framework/Wsat/pages/layout/TWsatLayout.php new file mode 100644 index 00000000..67caa77d --- /dev/null +++ b/framework/Wsat/pages/layout/TWsatLayout.php @@ -0,0 +1,36 @@ +validateSecurity(); + } + + private function validateSecurity() + { + if ($this->Session["wsat_password"] !== $this->getService()->getPassword()) + { + if (!$this->getPage() instanceof TWsatLogin) + { + $url = $this->Service->constructUrl('TWsatLogin'); + $this->Response->redirect($url); + } + } + } + + public function logout() + { + $this->Session["wsat_password"] = ""; + $url = $this->Service->constructUrl('TWsatLogin'); + $this->Response->redirect($url); + } + +} \ No newline at end of file -- cgit v1.2.3