summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 43fdc29)
raw | patch | inline | side by side (parent: 43fdc29)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 May 2009 06:06:17 +0000 (06:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 May 2009 06:06:17 +0000 (06:06 +0000) |
- 12995
- 12994
- 12993
- 12991
The above commits modified the unit tagging for fai objects.
Objects will now be tagged with the unit tag of the editing user.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13622 594d385d-05f5-0310-b6e9-bd551577e9d8
- 12994
- 12993
- 12991
The above commits modified the unit tagging for fai objects.
Objects will now be tagged with the unit tag of the editing user.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13622 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_FAI.inc b/trunk/gosa-plugins/fai/admin/fai/class_FAI.inc
index fd58da5b07fd25f17917bd75ff504a8706fa1d89..3366d0307d7a1aea7ce8c7c65f8c8264ac5bba3c 100644 (file)
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $dn));
$ldap->cd($dn);
+ $ui= get_userinfo();
+ FAI::tag_attrs($attrs, $dn, $ui->gosaUnitTag);
+
$ldap->cat($dn,array("dn"));
if($ldap->count()){
}
return("");
}
+
+
+ static function tag_attrs(&$at, $dn= "", $tag= "", $show= false)
+ {
+ /* Remove tags that may already be here... */
+ remove_objectClass("gosaAdministrativeUnitTag", $at);
+ if (isset($at['gosaUnitTag'])){
+ unset($at['gosaUnitTag']);
+ }
+
+ /* Set tag? */
+ if ($tag != ""){
+ add_objectClass("gosaAdministrativeUnitTag", $at);
+ $at['gosaUnitTag']= $tag;
+ }
+
+ /* Initially this object was tagged.
+ - But now, it is no longer inside a tagged department.
+ So force the remove of the tag.
+ (objectClass was already removed obove)
+ */
+ if($tag == ""){
+ $at['gosaUnitTag'] = array();
+ }
+ }
+
+
}
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiHook.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiHook.inc
index e71fc1b855f504c9007428c6ab98c1a7d3a75b1e..3fdd7070f291a1832b6c2627df639c7921ea5fcd 100644 (file)
}
/* Tag object */
- $this->tag_attrs($tmp, $sub_dn, $this->gosaUnitTag);
+ $ui= get_userinfo();
+ $this->tag_attrs($tmp, $sub_dn, $ui->gosaUnitTag);
if($obj['status'] == "delete"){
FAI::prepare_to_save_FAI_object($sub_dn,array(),true);
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiPackage.inc
index 4380ba3c7a10ec1bc44349d5393c21e9e5cf1f76..d33d148077eb164bc84403c58d80786e85b5ef57 100644 (file)
$pkgdn = "FAIvariable=".$name.",".$this->dn;
/* Tag object */
- $this->tag_attrs($pkgattrs, $pkgdn, $this->gosaUnitTag);
+ $ui= get_userinfo();
+ $this->tag_attrs($pkgattrs, $pkgdn, $ui->gosaUnitTag);
if(in_array($pkgattrs['FAIvariableType'],array("boolean","multiselect","password","select","string","text"))){
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
index c8b0cdc1439f56f376be3c1fd7706b26773e2ae7..bd43bd7691ef0cd824eea945f3eb4240b9b83d81 100644 (file)
}
/* Tag object */
- $this->tag_attrs($disk_attrs, $disk_dn, $this->gosaUnitTag);
+ $ui= get_userinfo();
+ $this->tag_attrs($disk_attrs, $disk_dn, $ui->gosaUnitTag);
if($disk['status'] == "delete"){
FAI::prepare_to_save_FAI_object($disk_dn,array(),true);
}
/* Tag object */
- $this->tag_attrs($partition_attrs, $partition_dn, $this->gosaUnitTag);
+ $ui= get_userinfo();
+ $this->tag_attrs($partition_attrs, $partition_dn, $ui->gosaUnitTag);
if($partition['status'] == "delete"){
FAI::prepare_to_save_FAI_object($partition_dn,array(),true);
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiScript.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiScript.inc
index dc8359d929496a39098201dc74fc53dd58cdebf7..a604bd4b0ddd0b16a8205bb592f62e88850851e7 100644 (file)
}
/* Tag object */
- $this->tag_attrs($tmp, $sub_dn, $this->gosaUnitTag);
+ $ui= get_userinfo();
+ $this->tag_attrs($tmp, $sub_dn, $ui->gosaUnitTag);
if($obj['status'] == "delete"){
FAI::prepare_to_save_FAI_object($sub_dn,array(),true);
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiTemplate.inc
index 5e60e4f80637dd160e17a549b9fe593fac43ad55..b1d0af684d2682489b0fa5afb60183f931061184 100644 (file)
}
/* Tag object */
- $this->tag_attrs($tmp, $sub_dn, $this->gosaUnitTag);
+ $ui= get_userinfo();
+ $this->tag_attrs($tmp, $sub_dn, $ui->gosaUnitTag);
if($obj['status'] == "delete"){
FAI::prepare_to_save_FAI_object($sub_dn,array(),true);
diff --git a/trunk/gosa-plugins/fai/admin/fai/class_faiVariable.inc b/trunk/gosa-plugins/fai/admin/fai/class_faiVariable.inc
index 0847d8842c3584d039447498b6a37c63d011f938..c8d3f21aababfca7e52b1e69dfa79aa53939760d 100644 (file)
}
/* Tag object */
- $this->tag_attrs($tmp, $sub_dn, $this->gosaUnitTag);
+ $ui= get_userinfo();
+ $this->tag_attrs($tmp, $sub_dn, $ui->gosaUnitTag);
if($obj['status'] == "delete"){
FAI::prepare_to_save_FAI_object($sub_dn,array(),true);