diff options
author | Simon | 2011-04-05 12:58:56 +0200 |
---|---|---|
committer | Simon | 2011-04-05 12:58:56 +0200 |
commit | d106362ad158554ee09debf48ec0249ef8e2c599 (patch) | |
tree | b52279d6a1ba80ad3417a7ffd8853ee50c061a00 | |
parent | Unterstriche in Spaltentitel erlaubt(danke Michi...) (diff) | |
parent | weiteres Recht hinzugefügt (diff) | |
download | pbs2-d106362ad158554ee09debf48ec0249ef8e2c599.tar.gz pbs2-d106362ad158554ee09debf48ec0249ef8e2c599.tar.xz pbs2-d106362ad158554ee09debf48ec0249ef8e2c599.zip |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
20 files changed, 52 insertions, 42 deletions
diff --git a/application/modules/dev/forms/ConfirmDeleteAccount.php b/application/modules/dev/forms/ConfirmDeleteAccount.php index c093996..b82bf0b 100644 --- a/application/modules/dev/forms/ConfirmDeleteAccount.php +++ b/application/modules/dev/forms/ConfirmDeleteAccount.php @@ -18,10 +18,8 @@ class dev_Form_ConfirmDeleteAccount extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } - - } diff --git a/application/modules/dev/forms/GroupAdd.php b/application/modules/dev/forms/GroupAdd.php index 8132f3a..6c5cea9 100644 --- a/application/modules/dev/forms/GroupAdd.php +++ b/application/modules/dev/forms/GroupAdd.php @@ -56,7 +56,7 @@ class dev_Form_GroupAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/GroupEdit.php b/application/modules/dev/forms/GroupEdit.php index 96784de..f375181 100644 --- a/application/modules/dev/forms/GroupEdit.php +++ b/application/modules/dev/forms/GroupEdit.php @@ -39,7 +39,7 @@ class dev_Form_GroupEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/GroupLink.php b/application/modules/dev/forms/GroupLink.php index 8a65e77..40cbc5b 100644 --- a/application/modules/dev/forms/GroupLink.php +++ b/application/modules/dev/forms/GroupLink.php @@ -46,7 +46,7 @@ class dev_Form_GroupLink extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/LinkRight.php b/application/modules/dev/forms/LinkRight.php index 0745791..e371b3a 100644 --- a/application/modules/dev/forms/LinkRight.php +++ b/application/modules/dev/forms/LinkRight.php @@ -39,7 +39,7 @@ class dev_Form_LinkRight extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/PersonEdit.php b/application/modules/dev/forms/PersonEdit.php index c04f418..0dfa5e6 100644 --- a/application/modules/dev/forms/PersonEdit.php +++ b/application/modules/dev/forms/PersonEdit.php @@ -108,7 +108,7 @@ class dev_Form_PersonEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/RoleAdd.php b/application/modules/dev/forms/RoleAdd.php index 6d43904..3e12355 100644 --- a/application/modules/dev/forms/RoleAdd.php +++ b/application/modules/dev/forms/RoleAdd.php @@ -45,7 +45,7 @@ class dev_Form_RoleAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/RoleEdit.php b/application/modules/dev/forms/RoleEdit.php index 1a9afc5..7eb0a0e 100644 --- a/application/modules/dev/forms/RoleEdit.php +++ b/application/modules/dev/forms/RoleEdit.php @@ -53,7 +53,7 @@ class dev_Form_RoleEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php index 76639bd..83358c4 100644 --- a/application/modules/user/controllers/GroupController.php +++ b/application/modules/user/controllers/GroupController.php @@ -2,21 +2,13 @@ class User_GroupController extends Zend_Controller_Action { - protected $groupMapper = null; - protected $groupGroupsMapper = null; - protected $membershipMapper = null; - protected $groupRequestMapper = null; - protected $personmapper = null; - protected $rolemapper = null; - protected $groupList = null; - protected $userIDsNamespace = null; public function init() @@ -112,7 +104,15 @@ class User_GroupController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - $this->_redirect($_SERVER['HTTP_REFERER']); + if($_SERVER['HTTP_REFERER']) { + $this->_redirect($_SERVER['HTTP_REFERER']); + } else { + if(isset($groupID)) { + $this->_redirect('/user/group/show/groupID/' . $groupID); + } else { + $this->_helper->redirector('', 'group'); + } + } return; } } @@ -217,12 +217,8 @@ class User_GroupController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - if(strpos($_SERVER['HTTP_REFERER'], '/user/group/show')) { - if(strpos($_SERVER['HTTP_REFERER'], '/groupID/')) { - $this->_redirect('/user/group/showall'); - } else { - $this->_helper->redirector('changemembership', 'person'); - } + if(strpos($_SERVER['HTTP_REFERER'], '/user/group/show') !== false && strpos($_SERVER['HTTP_REFERER'], '/groupID/') === false) { + $this->_helper->redirector('changemembership', 'person'); } else { $this->_helper->redirector('showall', 'group'); } diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php index 059d9c4..38c12b0 100644 --- a/application/modules/user/controllers/RoleController.php +++ b/application/modules/user/controllers/RoleController.php @@ -2,7 +2,7 @@ class User_RoleController extends Zend_Controller_Action { - protected $userIDsNamespace; + protected $userIDsNamespace = null; public function init() { @@ -76,8 +76,8 @@ class User_RoleController extends Zend_Controller_Action } } } - //$this->_helper->redirector('', 'role'); - //return; + $this->_helper->redirector('', 'role'); + return; } } @@ -127,7 +127,15 @@ class User_RoleController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - $this->_redirect($_SERVER['HTTP_REFERER']); + if($_SERVER['HTTP_REFERER']) { + $this->_redirect($_SERVER['HTTP_REFERER']); + } else { + if(isset($roleID)) { + $this->_redirect('/user/role/show/roleID/' . $roleID); + } else { + $this->_helper->redirector('', 'role'); + } + } return; } } @@ -215,7 +223,11 @@ class User_RoleController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - $this->_helper->redirector('', 'role'); + if(strpos($_SERVER['HTTP_REFERER'], '/user/role/show') !== false && strpos($_SERVER['HTTP_REFERER'], '/roleID/') === false) { + $this->_helper->redirector('changemembership', 'person'); + } else { + $this->_helper->redirector('', 'role'); + } return; } else { $pbsNotifier = new Pbs_Notifier(); diff --git a/application/modules/user/forms/ConfirmDeleteAccount.php b/application/modules/user/forms/ConfirmDeleteAccount.php index 7bf5a32..6237844 100644 --- a/application/modules/user/forms/ConfirmDeleteAccount.php +++ b/application/modules/user/forms/ConfirmDeleteAccount.php @@ -18,7 +18,7 @@ class user_Form_ConfirmDeleteAccount extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/GroupAdd.php b/application/modules/user/forms/GroupAdd.php index ff2b97a..b1ae0ee 100644 --- a/application/modules/user/forms/GroupAdd.php +++ b/application/modules/user/forms/GroupAdd.php @@ -56,7 +56,7 @@ class user_Form_GroupAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/GroupEdit.php b/application/modules/user/forms/GroupEdit.php index 4f0d7fc..43e568b 100644 --- a/application/modules/user/forms/GroupEdit.php +++ b/application/modules/user/forms/GroupEdit.php @@ -44,7 +44,7 @@ class user_Form_GroupEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } }
\ No newline at end of file diff --git a/application/modules/user/forms/GroupLink.php b/application/modules/user/forms/GroupLink.php index 9db7ce4..9bddb19 100644 --- a/application/modules/user/forms/GroupLink.php +++ b/application/modules/user/forms/GroupLink.php @@ -46,7 +46,7 @@ class user_Form_GroupLink extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/GroupRequest.php b/application/modules/user/forms/GroupRequest.php index c9ba273..a381207 100644 --- a/application/modules/user/forms/GroupRequest.php +++ b/application/modules/user/forms/GroupRequest.php @@ -40,7 +40,7 @@ class user_Form_GroupRequest extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/LinkRight.php b/application/modules/user/forms/LinkRight.php index 8fe2f46..54aacd6 100644 --- a/application/modules/user/forms/LinkRight.php +++ b/application/modules/user/forms/LinkRight.php @@ -32,7 +32,7 @@ class user_Form_LinkRight extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/PersonEdit.php b/application/modules/user/forms/PersonEdit.php index a6bd123..7175691 100644 --- a/application/modules/user/forms/PersonEdit.php +++ b/application/modules/user/forms/PersonEdit.php @@ -108,7 +108,7 @@ class user_Form_PersonEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/RoleAdd.php b/application/modules/user/forms/RoleAdd.php index 9a9570c..5968b47 100644 --- a/application/modules/user/forms/RoleAdd.php +++ b/application/modules/user/forms/RoleAdd.php @@ -62,7 +62,7 @@ class user_Form_RoleAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/RoleEdit.php b/application/modules/user/forms/RoleEdit.php index 0bdc977..938ebce 100644 --- a/application/modules/user/forms/RoleEdit.php +++ b/application/modules/user/forms/RoleEdit.php @@ -58,7 +58,7 @@ class user_Form_RoleEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } @@ -361,6 +361,8 @@ INSERT INTO `pbs_rightcategory` (`rightcategoryID`, `title`) VALUES -- Insert rights INSERT INTO `pbs`.`pbs_right` (`rightID`, `rightcategoryID`, `shortcut`, `title`, `description`) VALUES -- Person + -- Personenübersicht anzeigen +(NULL, '1', 'pso', 'Show overview of persons', NULL), -- Eigene Personendetails ändern (NULL, '1', 'peod', 'Edit own profiledetails', NULL), -- Eigene Personendetails anzeigen @@ -379,7 +381,7 @@ INSERT INTO `pbs`.`pbs_right` (`rightID`, `rightcategoryID`, `shortcut`, `title` -- Gruppen -- Gruppenübersicht anzeigen -(NULL, '2', 'gso', 'Show overview of group', NULL), +(NULL, '2', 'gso', 'Show overview of groups', NULL), -- Gruppendetails der eigenen Gruppe anzeigen (NULL, '2', 'gsdo', 'Show details of own group', NULL), -- Gruppendetails anderer Gruppen anzeigen @@ -395,9 +397,11 @@ INSERT INTO `pbs`.`pbs_right` (`rightID`, `rightcategoryID`, `shortcut`, `title` -- Gruppenanfragen stellen (NULL, '2', 'grm', 'Request membership', NULL), -- Gruppenanfragen akzeptieren -(NULL, '2', 'gam', 'Accect membership request', NULL), +(NULL, '2', 'gam', 'Accept membership request', NULL), -- Gruppenanfragen ablehnen (NULL, '2', 'gdm', 'Decline membership request', NULL), + -- Gruppe verlassen +(NULL, '2', 'gl', 'Leave Group', NULL), -- Mitgliedschaften aus eigenen Gruppen entfernen (NULL, '2', 'gdmo', 'Delete membership in own group', NULL), -- Mitgliedschaften aus anderen Gruppen entfernen @@ -552,4 +556,4 @@ INSERT INTO `pbs`.`pbs_group` (`groupID` ,`title` ,`description`)VALUES (1, 'OpenSLX', 'This is the OpenSLX-Group'); INSERT INTO `pbs`.`pbs_role` (`roleID`, `groupID`, `title`, `description`, `inheritance`) VALUES (1, '1', 'SuperAdmin', 'The SuperAdmin', 0); INSERT INTO `pbs`.`pbs_rightroles` (`roleID`, `rightID`) VALUES -(1, 1),(1, 2),(1, 3),(1, 4),(1, 5),(1, 6),(1, 7),(1, 8),(1, 9),(1, 10),(1, 11),(1, 12),(1, 13),(1, 14),(1, 15),(1, 16),(1, 17),(1, 18),(1, 19),(1, 20),(1, 21),(1, 22),(1, 23),(1, 24),(1, 25),(1, 26),(1, 27),(1, 28),(1, 29),(1, 30),(1, 31),(1, 32),(1, 33),(1, 34),(1, 35),(1, 36),(1, 37),(1, 38),(1, 39),(1, 40),(1, 41),(1, 42),(1, 43),(1, 44),(1, 45),(1, 46),(1, 47),(1, 48),(1, 49),(1, 50),(1, 51),(1, 52),(1, 53),(1, 54),(1, 55),(1, 56),(1, 57),(1, 58),(1, 59),(1, 60),(1, 61),(1, 62),(1, 63),(1, 64),(1, 65),(1, 66),(1, 67),(1, 68),(1, 69),(1, 70),(1, 71),(1, 72),(1, 73),(1, 74),(1, 75),(1, 76),(1, 77),(1, 78),(1, 79),(1, 80),(1, 81),(1, 82); +(1, 1),(1, 2),(1, 3),(1, 4),(1, 5),(1, 6),(1, 7),(1, 8),(1, 9),(1, 10),(1, 11),(1, 12),(1, 13),(1, 14),(1, 15),(1, 16),(1, 17),(1, 18),(1, 19),(1, 20),(1, 21),(1, 22),(1, 23),(1, 24),(1, 25),(1, 26),(1, 27),(1, 28),(1, 29),(1, 30),(1, 31),(1, 32),(1, 33),(1, 34),(1, 35),(1, 36),(1, 37),(1, 38),(1, 39),(1, 40),(1, 41),(1, 42),(1, 43),(1, 44),(1, 45),(1, 46),(1, 47),(1, 48),(1, 49),(1, 50),(1, 51),(1, 52),(1, 53),(1, 54),(1, 55),(1, 56),(1, 57),(1, 58),(1, 59),(1, 60),(1, 61),(1, 62),(1, 63),(1, 64),(1, 65),(1, 66),(1, 67),(1, 68),(1, 69),(1, 70),(1, 71),(1, 72),(1, 73),(1, 74),(1, 75),(1, 76),(1, 77),(1, 78),(1, 79),(1, 80),(1, 81),(1, 82),(1, 83),(1, 84); |