From: hickert Date: Wed, 19 Jul 2006 06:18:16 +0000 (+0000) Subject: udpated acls X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=92a06253bd651f376ac3a29d15d145c22b1908cc;p=gosa.git udpated acls git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4215 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index bd19a69dc..5a8964902 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -581,7 +581,7 @@ class user extends plugin /* Save government mode attributes */ if ($this->config->current['GOVERNMENTMODE']){ foreach ($this->govattrs as $val){ - if (obj_is_writable($this->dn, "user",$val) && isset ($_POST["$val"])){ + if ($this->acl_is_writable($val) && isset ($_POST["$val"])){ $data= stripcslashes($_POST["$val"]); if ($data != $this->$val){ $this->is_modified= TRUE; @@ -949,18 +949,16 @@ class user extends plugin $new_dn= 'cn='.$this->cn.','.get_people_ou().$this->base; } - $ui= get_userinfo(); - #FIXME How is the create flag stored ?, Add check for rename move ... - if ($this->dn == "new" && !obj_is_writable($this->dn, "user","create")){ -// $message[]= _("You have no permissions to create a user on this 'Base'."); + if ($this->dn == "new" && !$this->acl_is_createable()){ + $message[]= _("You have no permissions to create a user on this 'Base'."); } elseif ($this->dn != $new_dn && $this->dn != "new"){ - if (!obj_is_writable($this->dn, "user","create")){ + if (!$this->acl_is_writable($this->dn, "user","create")){ $message[]= _("You have no permissions to move a user from the original 'Base'."); } } /* must: sn, givenName, uid */ - if ($this->sn == "" && obj_is_writable($this->dn, "user","sn")){ + if ($this->sn == "" && ($this->acl_is_writable($this->dn, "user","sn") || ($this->new))){ $message[]= _("The required field 'Name' is not set."); } @@ -975,10 +973,10 @@ class user extends plugin /* In template mode, the uid and givenName are autogenerated... */ if (!$this->is_template){ - if ($this->givenName == "" && obj_is_writable($this->dn, "user","givenName")){ + if ($this->givenName == "" && $this->acl_is_writable("givenName")){ $message[]= _("The required field 'Given name' is not set."); } - if ($this->uid == "" && obj_is_writable($this->dn, "user","uid")){ + if ($this->uid == "" && $this->acl_is_writable("uid")){ $message[]= _("The required field 'Login' is not set."); } if (!(isset($this->config->current['DNMODE']) && $this->config->current['DNMODE'] == "uid")){