summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/modules/user/controllers/PersonController.php6
-rw-r--r--application/modules/user/controllers/RoleController.php1
-rw-r--r--application/modules/user/views/scripts/auth/delete.phtml5
-rw-r--r--application/modules/user/views/scripts/role/show.phtml13
-rw-r--r--library/Pbs/NewMember.php2
5 files changed, 16 insertions, 11 deletions
diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php
index d70067a..76cd958 100644
--- a/application/modules/user/controllers/PersonController.php
+++ b/application/modules/user/controllers/PersonController.php
@@ -58,11 +58,11 @@ class user_PersonController extends Zend_Controller_Action
$this->_redirect('/user');
}
$this->view->showRight = Pbs_Acl::checkRight('psod');
- $this->view->editRight = Pbs_Acl::checkRight('peoa');
- $this->view->deleteRight = Pbs_Acl::checkRight('pd');
+ $this->view->editRight = Pbs_Acl::checkRight('peod');
+ $this->view->deleteRight = Pbs_Acl::checkRight('pdo');
$this->view->showOtherRight = Pbs_Acl::checkRight('psood');
$this->view->editOtherRight = Pbs_Acl::checkRight('peoa');
- $this->view->deleteOtherRight = Pbs_Acl::checkRight('pdo');
+ $this->view->deleteOtherRight = Pbs_Acl::checkRight('pd');
$this->view->suspendRight = Pbs_Acl::checkRight('psa');
$this->view->userIDsNamespace = $this->userIDsNamespace;
diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php
index 8d2b044..93a2cfa 100644
--- a/application/modules/user/controllers/RoleController.php
+++ b/application/modules/user/controllers/RoleController.php
@@ -217,6 +217,7 @@ class User_RoleController extends Zend_Controller_Action
$roleID = $this->userIDsNamespace['roleID'];
}
}
+ $this->view->membership = $this->membership;
if($roleID) {
$roleMapper = new Application_Model_RoleMapper();
$role = $roleMapper->find($roleID);
diff --git a/application/modules/user/views/scripts/auth/delete.phtml b/application/modules/user/views/scripts/auth/delete.phtml
index 83afc80..75d9ef6 100644
--- a/application/modules/user/views/scripts/auth/delete.phtml
+++ b/application/modules/user/views/scripts/auth/delete.phtml
@@ -1,6 +1,7 @@
<h1>Delete Account</h1>
-Do you really want to delete account?
+Do you really want to delete account?<br/>
+This will delete all of your data on the server.
<?php
$this->deleteconfirmform->setAction($this->url());
echo $this->deleteconfirmform;
-?> \ No newline at end of file
+?>
diff --git a/application/modules/user/views/scripts/role/show.phtml b/application/modules/user/views/scripts/role/show.phtml
index 765153f..0e440f2 100644
--- a/application/modules/user/views/scripts/role/show.phtml
+++ b/application/modules/user/views/scripts/role/show.phtml
@@ -9,10 +9,12 @@ if($this->roleID) {
<h1>Role Details</h1>
<?php
}
- if($this->deleteRight && $this->roleID == $this->userIDsNamespace['roleID']) echo $this->formButton('deleterole', 'Delete', array(
+ if($this->deleteRight && $this->role->getGroupID() == $this->membership->getGroupID())
+ echo $this->formButton('deleterole', 'Delete', array(
'onclick' => 'self.location="/user/role/delete/roleID/' . $this->role->getID() .'"',
'class' => 'rightbutton'));
- if($this->editRight && $this->roleID == $this->userIDsNamespace['roleID']) echo $this->formButton('editrole', 'Edit', array(
+ if($this->editRight && $this->role->getGroupID() == $this->membership->getGroupID())
+ echo $this->formButton('editrole', 'Edit', array(
'onclick' => 'self.location="/user/role/edit/roleID/' . $this->role->getID() .'"',
'class' => 'rightbutton'));
?>
@@ -38,7 +40,7 @@ if($this->roleID) {
<h2>Rights:</h2>
<?php
if($this->rightsAvailable === true) {
- if($this->addRightToRoleRight && $this->roleID == $this->userIDsNamespace['roleID']) {
+ if($this->addRightToRoleRight && $this->role->getGroupID() == $this->membership->getGroupID()) {
echo $this->formButton('linkright', 'Add Rights', array(
'onclick' => 'self.location="/user/role/linkright/roleID/' . $this->role->getID() .'"',
'class' => 'addbutton'))?>
@@ -48,7 +50,8 @@ if($this->rightsAvailable === true) {
if(count($this->rightsList)==0) {
echo "There are no Rights to display.";
} else {
- if($this->removeRightOfRoleRight && $this->roleID == $this->userIDsNamespace['roleID']) echo $this->formButton('deleteallrights', 'Delete All Rights', array(
+ if($this->removeRightOfRoleRight && $this->role->getGroupID() == $this->membership->getGroupID())
+ echo $this->formButton('deleteallrights', 'Delete All Rights', array(
'onclick' => 'self.location="/user/role/unlinkright/rightrolesID/' . $this->roleID . '-all"',
'class' => 'rightbutton'));?>
<br />
@@ -63,7 +66,7 @@ if(count($this->rightsList)==0) {
foreach($rights as $right):
?>
<div class='element'>
-<div class='content'><?php if($this->removeRightOfRoleRight && $this->roleID == $this->userIDsNamespace['roleID']) {
+<div class='content'><?php if($this->removeRightOfRoleRight && $this->role->getGroupID() == $this->membership->getGroupID()) {
?>
<div class='actions'><a
href="<?php echo $this->url(
diff --git a/library/Pbs/NewMember.php b/library/Pbs/NewMember.php
index 2865ef9..9800d04 100644
--- a/library/Pbs/NewMember.php
+++ b/library/Pbs/NewMember.php
@@ -28,7 +28,7 @@ class Pbs_NewMember{
$userBootmenu->setID($userBootmenuID);
# print_a('userbootmenu',$userBootmenu);
- if($defaultBootmenu->getID() != ''){
+ if($defaultBootmenu != ''){
$bootmenuentries = $bootmenuentriesMapper->findBy(array('bootmenuID'=>$defaultBootmenu->getID()));
foreach($bootmenuentries as $bme){
$bme->setID(null);