From: hickert Date: Wed, 28 May 2008 09:34:16 +0000 (+0000) Subject: Updated acl checks X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e95fcd77dc0e6cef16bf02a5c7d0bf5b4755b082;p=gosa.git Updated acl checks git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11066 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc index d2b3af58c..68cc78273 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc @@ -15,6 +15,8 @@ class printgeneric extends plugin var $gotoPrinterPPD = ""; var $initial_PPD = ""; var $orig_dn = ""; + var $orig_cn = ""; + var $orig_base = ""; var $UserMember =""; var $UserMembers =array(); @@ -143,6 +145,8 @@ class printgeneric extends plugin } } } + $this->orig_cn = $this->cn; + $this->orig_base = $this->base; } function set_acl_base($base) @@ -695,6 +699,14 @@ class printgeneric extends plugin } } + /* Check if we are allowed to create or move this object + */ + if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){ + $message[] = msgPool::permCreate(); + }elseif($this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){ + $message[] = msgPool::permMove(); + } + return ($message); } diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc index 05caf3468..fd8a0e78d 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc @@ -30,6 +30,7 @@ class termgeneric extends plugin var $description= ""; var $orig_dn= ""; var $orig_cn= ""; + var $orig_base= ""; var $inheritTimeServer = true; @@ -132,6 +133,7 @@ class termgeneric extends plugin $this->orig_dn= $this->dn; $this->orig_cn= $this->cn; + $this->orig_base= $this->base; } function set_acl_base($base) @@ -439,6 +441,14 @@ class termgeneric extends plugin $message[]= msgPool::required(_("NTP server")); } + /* Check if we are allowed to create or move this object + */ + if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){ + $message[] = msgPool::permCreate(); + }elseif($this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){ + $message[] = msgPool::permMove(); + } + return ($message); } diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc index b5207001c..0da304eb7 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc @@ -32,6 +32,7 @@ class workgeneric extends plugin var $l= ""; var $orig_dn= ""; var $orig_cn= ""; + var $orig_base= ""; /* Plugin side filled */ var $modes= array(); @@ -154,6 +155,7 @@ class workgeneric extends plugin /* Save 'dn' for later referal */ $this->orig_dn= $this->dn; $this->orig_cn= $this->cn; + $this->orig_base= $this->base; } @@ -486,6 +488,14 @@ class workgeneric extends plugin CONFIRM_DIALOG); } } + + /* Check if we are allowed to create or move this object + */ + if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){ + $message[] = msgPool::permCreate(); + }elseif($this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){ + $message[] = msgPool::permMove(); + } return ($message); }