summaryrefslogtreecommitdiffstats
path: root/application/modules/user
diff options
context:
space:
mode:
authorSimon2011-04-13 17:07:44 +0200
committerSimon2011-04-13 17:07:44 +0200
commit5b1a2cb9c5a39390d125c7bc3667bcd6fa75c0d3 (patch)
tree4b7c21589a1681d564c309555d99855749118e07 /application/modules/user
parentRechte in Group nächster Teil (diff)
downloadpbs2-5b1a2cb9c5a39390d125c7bc3667bcd6fa75c0d3.tar.gz
pbs2-5b1a2cb9c5a39390d125c7bc3667bcd6fa75c0d3.tar.xz
pbs2-5b1a2cb9c5a39390d125c7bc3667bcd6fa75c0d3.zip
Groups - Rechte & RootNode darf keine Eltern
Diffstat (limited to 'application/modules/user')
-rw-r--r--application/modules/user/controllers/GroupController.php23
1 files changed, 22 insertions, 1 deletions
diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php
index e266ad7..b66f368 100644
--- a/application/modules/user/controllers/GroupController.php
+++ b/application/modules/user/controllers/GroupController.php
@@ -11,6 +11,7 @@ class User_GroupController extends Zend_Controller_Action
protected $groupList = null;
protected $userIDsNamespace = null;
protected $membership;
+ protected $page;
public function init()
{
@@ -27,7 +28,8 @@ class User_GroupController extends Zend_Controller_Action
$userIDsNamespace = Zend_Session::namespaceGet('userIDs');
$this->membership = new Application_Model_Membership();
$this->membershipMapper->find($userIDsNamespace['membershipID'],$this->membership);
-
+
+ $this->page = $this->_request->getParam('page');
} else {
$this->_helper->redirector('login', 'auth');
return;
@@ -39,6 +41,22 @@ class User_GroupController extends Zend_Controller_Action
// ACL show overview
if(!Pbs_Acl::checkRight('gso'))
$this->_redirect('/user');
+
+ $result = $this->_request->getParam('deleteresult');
+ if($result != ""){
+ $pbsNotifier = new Pbs_Notifier();
+ $this->view->notification = $pbsNotifier->notify('delete',$result);
+ }
+ $result = $this->_request->getParam('modifyresult');
+ if($result != ""){
+ $pbsNotifier = new Pbs_Notifier();
+ $this->view->notification = $pbsNotifier->notify('modify',$result);
+ }
+ $result = $this->_request->getParam('addresult');
+ if($result != ""){
+ $pbsNotifier = new Pbs_Notifier();
+ $this->view->notification = $pbsNotifier->notify('create',$result);
+ }
$this->view->groupList = $this->groupList;
@@ -284,6 +302,9 @@ class User_GroupController extends Zend_Controller_Action
if ($linkForm->isValid($_POST)) {
$groupgroups = new Application_Model_GroupGroups();
+ if($_POST['superordinatedGroupID'] == $_POST['groupID'] || $_POST['groupID'] == 1) {
+ $this->_redirect('/user/group/index/page/'.$this->page.'/addresult/forbidden');
+ }
$groupgroups->setParentID($_POST['superordinatedGroupID']);
$groupgroups->setGroupID($_POST['groupID']);
try {