From 5d621c6ce29d2059480b3283daf14162c74365db Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 18 Apr 2011 13:16:23 +0200 Subject: Rechte in PersonController korrigiert --- application/modules/user/views/scripts/auth/delete.phtml | 5 +++-- application/modules/user/views/scripts/role/show.phtml | 13 ++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'application/modules/user/views/scripts') 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 @@

Delete Account

-Do you really want to delete account? +Do you really want to delete account?
+This will delete all of your data on the server. 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) {

Role Details

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) {

Rights:

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'));?>
@@ -63,7 +66,7 @@ if(count($this->rightsList)==0) { foreach($rights as $right): ?>
-
removeRightOfRoleRight && $this->roleID == $this->userIDsNamespace['roleID']) { +
removeRightOfRoleRight && $this->role->getGroupID() == $this->membership->getGroupID()) { ?>