summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
authorBjörn Geiger2011-03-10 22:15:12 +0100
committerBjörn Geiger2011-03-10 22:15:12 +0100
commitfdd473d1a97f2c54243a84b09bf4245e3e4ba8b2 (patch)
tree6da57182b164c03fedd96f823e618ec02b502d44 /application/controllers
parentBenutzervewaltung, Gruppenverwaltung, Membershipverwaltung und noch leerer Ro... (diff)
downloadpbs2-fdd473d1a97f2c54243a84b09bf4245e3e4ba8b2.tar.gz
pbs2-fdd473d1a97f2c54243a84b09bf4245e3e4ba8b2.tar.xz
pbs2-fdd473d1a97f2c54243a84b09bf4245e3e4ba8b2.zip
so geändert, dass nur im eingeloggten Zustand verfügbar
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/GroupController.php18
-rw-r--r--application/controllers/RoleController.php82
2 files changed, 54 insertions, 46 deletions
diff --git a/application/controllers/GroupController.php b/application/controllers/GroupController.php
index 1de9207..fbc7943 100644
--- a/application/controllers/GroupController.php
+++ b/application/controllers/GroupController.php
@@ -12,13 +12,17 @@ class GroupController extends Zend_Controller_Action
public function init()
{
- $this->groupMapper = new Application_Model_GroupMapper();
- $this->groupGroupsMapper = new Application_Model_GroupGroupsMapper();
- $this->membershipMapper = new Application_Model_MembershipMapper();
- $this->groupRequestMapper = new Application_Model_GroupRequestMapper();
- $this->personmapper = new Application_Model_PersonMapper();
- $this->rolemapper = new Application_Model_RoleMapper();
- $this->groupList = $this->groupMapper->fetchAll();
+ if (Zend_Auth::getInstance()->hasIdentity()) {
+ $this->groupMapper = new Application_Model_GroupMapper();
+ $this->groupGroupsMapper = new Application_Model_GroupGroupsMapper();
+ $this->membershipMapper = new Application_Model_MembershipMapper();
+ $this->groupRequestMapper = new Application_Model_GroupRequestMapper();
+ $this->personmapper = new Application_Model_PersonMapper();
+ $this->rolemapper = new Application_Model_RoleMapper();
+ $this->groupList = $this->groupMapper->fetchAll();
+ } else {
+ $this->_helper->redirector('login', 'auth');
+ }
}
public function indexAction()
diff --git a/application/controllers/RoleController.php b/application/controllers/RoleController.php
index f5e436b..7a6c304 100644
--- a/application/controllers/RoleController.php
+++ b/application/controllers/RoleController.php
@@ -3,45 +3,49 @@
class RoleController extends Zend_Controller_Action
{
- public function init()
- {
-
- }
-
- public function indexAction()
- {
-
- }
-
- public function addAction()
- {
-
- }
-
- public function editAction()
- {
-
- }
-
- public function showAction()
- {
-
- }
-
- public function deleteAction()
- {
-
- }
-
- public function linkrightAction()
- {
- // action body
- }
-
- public function unlinkrightAction()
- {
- // action body
- }
+ public function init()
+ {
+ if (Zend_Auth::getInstance()->hasIdentity()) {
+
+ } else {
+ $this->_helper->redirector('login', 'auth');
+ }
+ }
+
+ public function indexAction()
+ {
+
+ }
+
+ public function addAction()
+ {
+
+ }
+
+ public function editAction()
+ {
+
+ }
+
+ public function showAction()
+ {
+
+ }
+
+ public function deleteAction()
+ {
+
+ }
+
+ public function linkrightAction()
+ {
+ // action body
+ }
+
+ public function unlinkrightAction()
+ {
+ // action body
+ }
}