summaryrefslogtreecommitdiffstats
path: root/application/modules/user
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user')
-rw-r--r--application/modules/user/controllers/BootmenuController.php4
-rw-r--r--application/modules/user/controllers/ConfigController.php1
-rw-r--r--application/modules/user/controllers/GroupController.php7
-rw-r--r--application/modules/user/controllers/PersonController.php15
-rw-r--r--application/modules/user/layouts/user.phtml6
-rw-r--r--application/modules/user/views/scripts/person/index.phtml5
6 files changed, 25 insertions, 13 deletions
diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php
index ed2239b..754c45d 100644
--- a/application/modules/user/controllers/BootmenuController.php
+++ b/application/modules/user/controllers/BootmenuController.php
@@ -8,6 +8,7 @@ class user_BootmenuController extends Zend_Controller_Action
protected $membershipMapper;
protected $membership;
protected $page;
+ protected $type;
public function init()
{
@@ -109,7 +110,8 @@ class user_BootmenuController extends Zend_Controller_Action
// Search
$search = $this->_request->getParam('search');
$mySearch = new Pbs_Search();
- $mySearch->setSearchTerm($search);
+ $mySearch->setSearchTerm($search);
+ $mySearch->setType($this->type);
$mySearch->setModule('bootmenu');
if($search != ''){
$this->view->search = $mySearch->getSearchTerm();
diff --git a/application/modules/user/controllers/ConfigController.php b/application/modules/user/controllers/ConfigController.php
index 6f5497a..a38af00 100644
--- a/application/modules/user/controllers/ConfigController.php
+++ b/application/modules/user/controllers/ConfigController.php
@@ -74,6 +74,7 @@ class user_ConfigController extends Zend_Controller_Action
$search = $this->_request->getParam('search');
$mySearch = new Pbs_Search();
$mySearch->setSearchTerm($search);
+ $mySearch->setType($this->type);
$mySearch->setModule('config');
if($search != ''){
$this->view->search = $mySearch->getSearchTerm();
diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php
index a17c571..a853a75 100644
--- a/application/modules/user/controllers/GroupController.php
+++ b/application/modules/user/controllers/GroupController.php
@@ -261,7 +261,12 @@ class User_GroupController extends Zend_Controller_Action
$membership->setPersonID($groupRequest->getPersonID());
$membership->setRoleID($_POST['roleID']);
try {
- $this->membershipMapper->save($membership);
+ $id = $this->membershipMapper->save($membership);
+
+ $membership->setID($id);
+
+ $newMember = new Pbs_NewMember();
+ $newMember->createDefaults($membership);
} catch(Zend_Exception $e)
{
echo "Caught exception: " . get_class($e) . "<br/>";
diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php
index 9cdf258..ad8f596 100644
--- a/application/modules/user/controllers/PersonController.php
+++ b/application/modules/user/controllers/PersonController.php
@@ -46,9 +46,9 @@ class user_PersonController extends Zend_Controller_Action
public function indexAction()
{
- if(!Pbs_Acl::checkRight('psod')) {
- $this->_redirect('/user');
- }
+ #if(!Pbs_Acl::checkRight('psod')) {
+ # $this->_redirect('/user');
+ #}
$this->view->person = $this->person;
// Pagination
$pagination = new Pbs_Pagination();
@@ -60,7 +60,8 @@ class user_PersonController extends Zend_Controller_Action
$this->view->groups = $pagination->getElements();
$this->view->pagination = $pagination->pagination($pageurl);
$this->view->page = $pagination->getRequestPage();
- $this->view->groupRequestRight = Pbs_Acl::checkRight('grm');
+ // This should be activated in case the person has no membership and no rights.
+ $this->view->groupRequestRight = true;
$this->view->editRight = Pbs_Acl::checkRight('peoa');
$this->view->leaveRight = Pbs_Acl::checkRight('gl');
$this->view->userIDsNamespace = Zend_Session::namespaceGet('userIDs');
@@ -129,9 +130,9 @@ class user_PersonController extends Zend_Controller_Action
public function requestAction()
{
- if(!Pbs_Acl::checkRight('grm')) {
- $this->_redirect('/user');
- }
+ #if(!Pbs_Acl::checkRight('grm')) {
+ # $this->_redirect('/user');
+ #}
$this->view->person = $this->person;
$allgroups = $this->groupMapper->fetchAll();
$groupRequests = $this->groupRequestMapper->findBy(array('personID' => $this->person->getID()),true);
diff --git a/application/modules/user/layouts/user.phtml b/application/modules/user/layouts/user.phtml
index b27b747..32569c9 100644
--- a/application/modules/user/layouts/user.phtml
+++ b/application/modules/user/layouts/user.phtml
@@ -29,10 +29,12 @@ echo $this->headScript()."\n";
<li class='navTreeItem'><a href='/user/'>user</a></li>
<li>
<ul class='navTreeLevel1'>
+ <?php if(Zend_Auth::getInstance()->hasIdentity()) {
+ echo "<li class='navTreeItem'><a href='/user/person'>Own Details</a></li>";
+ }
+ ?>
<?php if (Zend_Auth::getInstance()->hasIdentity() && count(Zend_Session::namespaceGet('userIDs')) > 0) {
# This should be splitted
- if(Pbs_Acl::checkRight('psod'))
- echo "<li class='navTreeItem'><a href='/user/person'>Own Details</a></li>";
if(Pbs_Acl::checkRight('pso'))
echo "<li class='navTreeItem'><a href='/user/person/showall'>Personlist</a></li>";
if(Pbs_Acl::checkRight('gsdo'))
diff --git a/application/modules/user/views/scripts/person/index.phtml b/application/modules/user/views/scripts/person/index.phtml
index 7c6fc8d..c285ece 100644
--- a/application/modules/user/views/scripts/person/index.phtml
+++ b/application/modules/user/views/scripts/person/index.phtml
@@ -47,11 +47,12 @@ $class= 'highlight checked';
</div>
<?php endforeach ?></div>
<?php echo $this->pagination;
- if($this->groupRequestRight === true) echo $this->formButton('addtogroup', 'Add to additional
+
+}
+if($this->groupRequestRight === true) echo $this->formButton('addtogroup', 'Add to additional
Groups', array(
'onclick' => 'self.location="/user/person/request/"',
'class' => 'addbutton'));
-}
?>
<br />
<br />