summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 59a8bc9)
raw | patch | inline | side by side (parent: 59a8bc9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Jan 2007 08:16:01 +0000 (08:16 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Jan 2007 08:16:01 +0000 (08:16 +0000) |
-Fixed incoming handling, was not equal to 2.5 behaviour.
-Added ogroup member add, undefined index.
-Removed debug output from goFonServer
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5589 594d385d-05f5-0310-b6e9-bd551577e9d8
-Added ogroup member add, undefined index.
-Removed debug output from goFonServer
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5589 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index d50b78d55f058dfa0a7d747833f1865986aed398..a93aa96c060f6376ce8bcbaf52aaf58100358618 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
unset($attr['dn']);
if((!in_array("gosaApplication" , $attr['objectClass'])) && (!in_array("gotoMimeType", $attr['objectClass']))){
+ $attr['FAIdebianRelease'] = $destinationName;
if($type=="branch"){
$attr['FAIstate'] ="branch";
}elseif($type=="freeze"){
index 463ee0e2ccb8443dc586e99e77fefb1d82b69e41..bc1012c97fb367fb1992db9485ea730845d8c4c1 100644 (file)
function AddDelMembership($NewMember = false){
if($NewMember){
- $this->memberList[$NewMember]= $this->objcache[$NewMember];
+
+ /* Add member and force reload */
$this->member[$NewMember]= $NewMember;
+ $this->reload();
+
+ $this->memberList[$NewMember]= $this->objcache[$NewMember];
unset ($this->objects[$NewMember]);
uasort ($this->memberList, 'sort_list');
reset ($this->memberList);
- $this->reload();
}else{
/* Delete objects from group */
if (isset($_POST['delete_membership']) && isset($_POST['members'])){
diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc
index 488e882f66c4aebc76d4957a47c35573cebcac3c..7ec5ec944287921e748adc031afb701053c24c75 100644 (file)
"workstation",
"terminal",
"phone",
+ "incoming",
"printer"));
$this->parent = $parent;
"printer" => array("CLASS"=>"PRINTTABS", "TABCLASS" =>"printtabs", "ACL"=> "printer/printgeneric"),
"phone" => array("CLASS"=>"PHONETABS", "TABCLASS" =>"phonetabs", "ACL"=> "phone/phoneGeneric"),
"winstation" => array("CLASS"=>"WINTABS", "TABCLASS" =>"wintabs", "ACL"=> "winworkstation/wingeneric"),
+ "incoming" => array("CLASS"=>"", "TABCLASS" =>"", "ACL"=> "incoming/systems"),
"component" => array("CLASS"=>"COMPONENTTABS","TABCLASS" =>"componenttabs", "ACL"=> "component/componentGeneric"));
$acl_type = $type;
}
+ /* Map NewDevice acls to workstation acls */
+ if($type == "NewDevice"){
+ $type = "incoming";
+ $acl_type = "incoming";
+ }
+
/* Get complete category acls */
$acl_all = $ui->has_complete_category_acls($val['dn'],$acl_type) ;
diff --git a/plugins/admin/systems/class_goFonServer.inc b/plugins/admin/systems/class_goFonServer.inc
index 5f23e21620d7e01286038543cca892bf9d67b2fa..b8878786f0fb0aa35ba990f34e9fd0027ac6d5c2 100644 (file)
}
}
}
- return("fa");
}
diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc
index 9a47614b9874dd4694077ba2460cdc7dfce2b6cb..27c4541315641df6af7f74ee51f2a17d8643e389 100644 (file)
$this->orig_dn= $this->dn;
}
+
+ function set_acl_base($base)
+ {
+ plugin::set_acl_base($base);
+ $this->netConfigDNS->set_acl_base($base);
+ }
+
+
+ function set_acl_category($cat)
+ {
+ plugin::set_acl_category($cat);
+ $this->netConfigDNS->set_acl_category($cat);
+ }
+
+
function execute()
{
/* Call parent execute */
diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc
index ac36a2034057729f02f3d917f9962884c62053dd..7adac6abc999605cd92b9abcae71e6bf919842bd 100644 (file)
/* Create new default terminal
* Or create specified object of selected system type, from given incoming object
*/
+
+ $save_object_directly = false;
+ if(($s_action == "SelectedSystemType") && (isset($_POST['ObjectGroup']) && ($_POST['ObjectGroup'] != "none"))){
+ $save_object_directly = true;
+ }
+
if (isset($_POST['create_system'])||$s_action=="newsystem"||$s_action == "SelectedSystemType") {
/* If the current entry is an incoming object
}
- /********************
- Edit system type finished, check if everything went ok
+
+
+
+
+
+
+
+ /********************
+ Edit system type finished, check if everything went ok
********************/
/* Finish user edit is triggered by the tabulator dialog, so
the user wants to save edited data. Check and save at this
point. */
- if ((isset($_POST['edit_finish']) || isset($_POST['edit_apply'])) && (isset($this->systab->config))){
+ if ((isset($_POST['edit_finish'])) && (isset($this->systab->config)) || $save_object_directly){
/* Check tabs, will feed message array */
- $message= $this->systab->check();
+ $message = array();
+ if(!$save_object_directly){
+ $message = $this->systab->check();
+ }else{
+ $found = false;
+
+ /* Set gotoMode to active if we there was an ogroup selected . (save_object_directly) */
+ foreach(array("workgeneric"=>"active","servgeneric"=>"active","termgeneric"=>"graphic") as $tab => $value){
+ if(isset($this->systab->by_object[$tab]->gotoMode)) {
+ $found = true;
+ $this->systab->by_object[$tab]->gotoMode = $value;
+ }
+ }
+ if(!$found){
+ print_red(sprintf(_("Can't set gotoMode to status 'avtice', the current object couldn't be identified.")));
+ }
+ }
/* Save, or display error message? */
if (count($message) == 0){
/* Save terminal data to ldap */
- if(isset($_SESSION['SelectedSystemType']['ogroup'])){
+ if(isset($_SESSION['SelectedSystemType']['ogroup']) && $_SESSION['SelectedSystemType']['ogroup'] != 'none'){
foreach (array("workservice", "termservice") as $cls){
if (isset($this->systab->by_object[$cls])){
$this->systab->by_object[$cls]->gotoXMouseport= "";
}
}
}
+
$this->systab->save();
gosa_log ("System object'".$this->dn."' has been saved");
- /* Incoming behavior; you can select a system type and an ogroup membership.
+ /* Incoming behavior; you can select a system type and an ogroup membership.
* If this object is an Incoming object, $_SESSION['SelectedSystemType'] isset.
* Check if we must add the new object to an object group.
- *
- * If this is done, delete the old incoming entry... it is still there, because this is a new
+ *
+ * If this is done, delete the old incoming entry... it is still there, because this is a new
* entry and not an edited one, so we will delete it.
+ *
*/
if(isset($_SESSION['SelectedSystemType'])){
$ldap = $this->config->get_ldap_link();
}
$ldap->cd ($this->dn);
- $ldap->cat($this->dn, array('dn'));
+ $ldap->cat($this->dn, array('dn'));
if(count($ldap->fetch())){
$ldap->cd($this->dn);
$ldap->rmDir($this->dn);
$ldap->cd($this->config->current['BASE']);
}
- if (!isset($_POST['edit_apply'])){
- /* Terminal has been saved successfully, remove lock from
- LDAP. */
- if ($this->dn != "new"){
- del_lock ($this->dn);
- }
-
- unset ($this->systab);
- $this->systab= NULL;
- unset($_SESSION['objectinfo']);
+ /* Terminal has been saved successfully, remove lock from
+ LDAP. */
+ if ($this->dn != "new"){
+ del_lock ($this->dn);
}
+
+ unset ($this->systab);
+ $this->systab= NULL;
+ unset($_SESSION['objectinfo']);
} else {
/* Ok. There seem to be errors regarding to the tab data,
show message and continue as usual. */
}
}
+
/********************
Edit system was canceled
********************/
$tabs = array(
"terminal" => "ou=terminals,ou=systems,",
"workstation" => "ou=workstations,ou=systems,",
+ "incoming" => "ou=incoming,",
"server" => "ou=servers,ou=systems,",
"printer" => "ou=printers,ou=systems,",
"phone" => "ou=phones,ou=systems,",
return ($type);
}
+
+ /* !! Incoming dummy acls, required to defined acls for incoming objects
+ */
+ function plInfo()
+ {
+ return (array(
+ "plShortName" => _("Incoming objects"),
+ "plDescription" => _("Incoming objects"),
+ "plSelfModify" => FALSE,
+ "plDepends" => array(),
+ "plPriority" => 99,
+ "plSection" => array("administration"),
+ "plCategory" => array("incoming" => array( "description" => _("Incoming"),
+ "objectClass" => "")),
+ "plProvidedAcls"=> array()
+
+ ));
+ }
+
+
+
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 45efd16dafed2501d6ed25dafd60dbd5fab24ef9..36c9d3eb3a25cb641cab64df0a6d075df128df85 100644 (file)
/* Strip out 'default' values */
foreach (array("gotoSyslogServer") as $val){
- if ($this->attrs[$val] == "default"){
+ if (isset($this->attrs[$val]) && $this->attrs[$val] == "default"){
$this->attrs[$val]= array();
}
}
}
}
- print_a($this->attrs);
-
/* cn=default and macAddress=- indicates that this is a template */
if($this->cn == "wdefault"){
$this->netConfigDNS->macAddress = "-";