summaryrefslogtreecommitdiffstats
path: root/application/modules
diff options
context:
space:
mode:
authorSimon2011-04-26 21:11:54 +0200
committerSimon2011-04-26 21:11:54 +0200
commit3bb25503ac384a70a331c0d9d5ecc9f53123bf93 (patch)
tree6fb5c6ed769d920844a5db2fdcc58ea82eedb3f6 /application/modules
parentperson (diff)
downloadpbs2-3bb25503ac384a70a331c0d9d5ecc9f53123bf93.tar.gz
pbs2-3bb25503ac384a70a331c0d9d5ecc9f53123bf93.tar.xz
pbs2-3bb25503ac384a70a331c0d9d5ecc9f53123bf93.zip
BugFix Person...
Diffstat (limited to 'application/modules')
-rw-r--r--application/modules/user/controllers/PersonController.php29
-rw-r--r--application/modules/user/views/scripts/person/index.phtml1
2 files changed, 26 insertions, 4 deletions
diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php
index 008f015..64d03ae 100644
--- a/application/modules/user/controllers/PersonController.php
+++ b/application/modules/user/controllers/PersonController.php
@@ -83,6 +83,23 @@ class user_PersonController extends Zend_Controller_Action
$this->view->suspendRight = Pbs_Acl::checkRight('psa');
$this->view->userIDsNamespace = $this->userIDsNamespace;
+ $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->personList = $this->personmapper->fetchAll();
// Search
@@ -151,11 +168,15 @@ class user_PersonController extends Zend_Controller_Action
if(!Pbs_Acl::checkRight('peod')) {
$this->_redirect('/user');
}
- if($this->person->getID() == $this->_request->getParam('personID')) {
- if(!Pbs_Acl::checkRight('peoa')) {
- $this->_redirect('/user');
+ $requestedUser = $this->_request->getParam('personID');
+ if($requestedUser != "" && $this->person->getID() != $this->_request->getParam('personID')) {
+ if(!is_numeric($requestedUser)){
+ $this->_redirect('/user/person/index/page/'.$this->page.'/modifyresult/error');
}
- $person = $this->personmapper->find($personID);
+ if(!Pbs_Acl::checkRight('peoa')) {
+ $this->_redirect('/user/person/index/page/'.$this->page.'/modifyresult/forbidden');
+ }
+ $person = $this->personmapper->find($requestedUser);
$this->view->person = $person;
} else {
$this->view->person = $this->person;
diff --git a/application/modules/user/views/scripts/person/index.phtml b/application/modules/user/views/scripts/person/index.phtml
index 9899928..5d8add1 100644
--- a/application/modules/user/views/scripts/person/index.phtml
+++ b/application/modules/user/views/scripts/person/index.phtml
@@ -1,4 +1,5 @@
<h1>Persons Overview</h1>
+<?php if($this->notification != ''){echo $this->notification;} ?>
<?php echo $this->searchform; ?>
<div class='searchvars'>
<div class='head'>Available searchfilter:</div>