summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dc44063)
raw | patch | inline | side by side (parent: dc44063)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Jan 2007 06:46:00 +0000 (06:46 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Jan 2007 06:46:00 +0000 (06:46 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5525 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index a163a7e4af0da4b5a0cb5ae95331f8767ea0acc1..accb3d7e831b1700feea2f80a5847acb4349ab48 100644 (file)
/* Change state if needed */
if (isset($_POST['modify_state'])){
- $this->is_account= !$this->is_account;
+ if($this->is_account && $this->acl == "#all#"){
+ $this->is_account= !$this->is_account;
+ }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $this->is_account= !$this->is_account;
+ }
}
/* Group Dialog with enabled environment options */
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
-
- /* Onyl change state if we have posixs enabled or we want to remove this account */
- if(!(!$this->parent->by_object['posixAccount']->is_account && !$this->is_account)){
+
+ /* Onyl change account state if allowed */
+ if(!$this->parent->by_object['posixAccount']->is_account && !$this->is_account){
+ }elseif($this->is_account && $this->acl == "#all#"){
+ $this->is_account= !$this->is_account;
+ }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){
$this->is_account= !$this->is_account;
}
}
+
if(isset($this->parent)){
// 3. Account enabled . Editing from adminmenu
diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc
index a0bc50807778e1422b2199e5695595bace8f702c..0bf0c134ab31c035d12aeca2d077c5837fa975af 100644 (file)
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
- $this->is_account= !$this->is_account;
+
+ /* Onyl change account state if allowed */
+ if($this->is_account && $this->acl == "#all#" && !$this->accountDelegationsConfigured()){
+ $this->is_account= !$this->is_account;
+ }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $this->is_account= !$this->is_account;
+ }
}
/* Do we represent a valid account? */
}
}
}
+ if(isset($this->parent->by_object['connectivity']->plugin['kolabAccount'])){
+ if($this->parent->by_object['connectivity']->plugin['kolabAccount']->is_account){
+ return(true);
+ }
+ }
return(false);
}
diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc
index ba2fdeb1e1069e4863b5d31b6066b2aee13f74f5..3f06a241e0e9b3aca71f963aed6b4afae35e5b1c 100644 (file)
}
if(!$isCopyPaste){
+
+ $required = (isset($this->parent->by_object['sambaAccount']) && $this->parent->by_object['sambaAccount']->is_account) ||
+ (isset($this->parent->by_object['environment'] ) && $this->parent->by_object['environment'] ->is_account);
+
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
- if($this->is_account && $this->acl == "#all#"){
+ if($this->is_account && $this->acl == "#all#" && !$required ){
$this->is_account= !$this->is_account;
}elseif(!$this->is_account && chkacl($this->acl,"create") == ""){
$this->is_account= !$this->is_account;
diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc
index 690ece7f51dae6268e5761f8c3e01d7fb0087b55..96513ee1b153daae1143618c646a0154adde1f6c 100644 (file)
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
+
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
- $this->is_account= !$this->is_account;
+
+ /* Only change account state if allowed */
+ if($this->is_account && $this->acl == "#all#"){
+ $this->is_account= !$this->is_account;
+ }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $this->is_account= !$this->is_account;
+ }
}
+
/* Do we represent a valid account? */
if (!$this->is_account && $this->parent == NULL){
$display= "<img alt=\"\"src=\"images/stop.png\" align=\"middle\"> <b>".