diff options
Diffstat (limited to 'application/controllers/GroupController.php')
| -rw-r--r-- | application/controllers/GroupController.php | 18 |
1 files changed, 11 insertions, 7 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() |
