summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c0000e)
raw | patch | inline | side by side (parent: 7c0000e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Apr 2008 09:53:21 +0000 (09:53 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 2 Apr 2008 09:53:21 +0000 (09:53 +0000) |
-Not working
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10108 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10108 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/admin/sudo/class_divListSudo.inc b/gosa-core/plugins/admin/sudo/class_divListSudo.inc
index 29de823902920318b47c1693b01979e6023731fb..3174f6ef4c9c8d551d49b22d5b8a5bad934458d9 100644 (file)
}
/* Create summary string for list footer */
- $num_grps = count($groups);
- $num_grp_str = _("Number of listed roles");
+ $num = count($list);
+ $num_str = _("Number of listed roles");
$str = "<img class='center' src='images/select_sudo.png'
- title='".$num_grp_str."' alt='".$num_grp_str."'> ".$num_grps." ";
+ title='".$num_str."' alt='".$num_str."'> ".$num." ";
$this->set_List_Bottom_Info($str);
}
diff --git a/gosa-core/plugins/admin/sudo/class_sudoGeneric.inc b/gosa-core/plugins/admin/sudo/class_sudoGeneric.inc
index 1e52d96535909e8167e0eb76136018de7463a055..fdfb4d586ec3ddb42593bb076b31e1f507c0c8dc 100644 (file)
var $cn= "";
var $description= "";
- var $CopyPasteVars = array("force_gid","fon_group","smbgroup","groupType","sambaSID","sambaDomainName","SID","nagios_group","sambaGroupType");
-
- var $multiple_support = TRUE;
-
-
function sudo(&$config, $dn= NULL)
{
plugin::plugin ($config, $dn);
diff --git a/gosa-core/plugins/admin/sudo/class_sudoManagement.inc b/gosa-core/plugins/admin/sudo/class_sudoManagement.inc
index ece30b29a8a176906a2a946f719db758c763e69b..236ee4f7a0b7c13e5c33a2b98b6970b317ab31c0 100644 (file)
echo "base checks, maybe it is not set, or it do not exists";;
- /* Copy & Paste enabled ?*/
- if((isset($this->config->data['MAIN']['ENABLECOPYPASTE']))&&
- (preg_match("/true/i",$this->config->data['MAIN']['ENABLECOPYPASTE']))){
- $this->CopyPasteHandler = new CopyPasteHandler($this->config);
- }
-
/* Create dialog object */
$this->DivListSudo = new divListSudo($this->config,$this);
}
/* Call parent execute */
plugin::execute();
+ /********************
+ Handle Posts
+ ********************/
+
/* Store these posts if the current object is locked (used by somebody else)*/
- session::set('LOCK_VARS_TO_USE',array("/^act$/","/^id$/","/^group_edit_/","/^group_del_/","/^item_selected/","/^remove_multiple_sudos/","/^multiple_edit/","/menu_action/"));
+ session::set('LOCK_VARS_TO_USE',array(
+ "/^act$/","/^id$/","/^sudo_edit_/",
+ "/^sudo_del_/","/^item_selected/","/menu_action/"));
/* Save data */
$s_action = "";
$s_entry = "";
- $s_entry = preg_replace("/_.$/","",$s_entry);
-
+ foreach($_POST as $name => $value){
+ if(preg_match("/^sudo_edit_/",$name)){
+ $s_action = "edit_role";
+ $s_entry = preg_replace("/^sudo_edit_([0-9]*).*$/","\\1",$name);
+ }
+ if(preg_match("/^sudo_del_/",$name)){
+ $s_action = "del_role";
+ $s_entry = preg_replace("/^sudo_del_([0-9]*).*$/","\\1",$name);
+ }
+ }
+
+ if(isset($_GET['act']) && isset($_GET['id']) && $_GET['act'] == "edit_entry"){
+ $id = trim($_GET['id']);
+ if(isset($this->list[$id])){
+ $s_action = "edit_role";
+ $s_entry = $id;
+ }
+ }
+
/* handle C&P from layers menu */
- if(isset($_POST['menu_action']) && preg_match("/^multiple_copy_systems/",$_POST['menu_action'])){
- $s_action = "copy_multiple";
+ if(isset($_POST['menu_action']) && in_array($_POST['menu_action'],array("new_role","remove_multiple"))){
+ $s_action = $_POST['menu_action'];
}
$smarty= get_smarty();
/********************
- Create notification event
- ********************/
-
- /********************
- Create a new group ...
+ Create a new sudo ...
********************/
- /* New group? */
- if ($s_action=="new"){
+ /* New sudo? */
+ if ($s_action=="new_role"){
/* Check create permissions */
- $acl = $this->ui->get_permissions($this->DivListSudo->selectedBase,"sudos/group");
+ $acl = $this->ui->get_permissions($this->DivListSudo->selectedBase,"sudo/sudo");
if(preg_match("/c/",$acl)){
/* By default we set 'dn' to 'new', all relevant plugins will
react on this. */
$this->dn= "new";
- /* Create new grouptab object */
- $this->grouptab= new grouptabs($this->config, $this->config->data['TABS']['GROUPTABS'], $this->dn);
+ /* Create new sudotabs object */
+ $this->sudotabs= new sudotabs($this->config, $this->config->data['TABS']['SUDOTABS'], $this->dn);
- /* Set up the group ACL's for this 'dn' */
- $this->grouptab->set_acl_base($this->DivListSudo->selectedBase);
+ /* Set up the sudo ACL's for this 'dn' */
+ $this->sudotabs->set_acl_base($this->base);
}
}
/********************
- Save Group Tab/Object Changes
+ Save Sudo Tab/Object Changes
********************/
- /* Finish group edit is triggered by the tabulator dialog, so
+ /* Finish sudo 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->grouptab->config)) ){
+ if ((isset($_POST['edit_finish']) || isset($_POST['edit_apply'])) && is_object($this->sudotabs)){
/* Check tabs, will feed message array
Save, or display error message? */
- $message= $this->grouptab->check();
+ $message= $this->sudotabs->check();
if (count($message) == 0){
/* Save user data to ldap */
- $this->grouptab->save();
+ $this->sudotabs->save();
if (!isset($_POST['edit_apply'])){
- /* Group has been saved successfully, remove lock from LDAP. */
+ /* Sudo has been saved successfully, remove lock from LDAP. */
if ($this->dn != "new"){
del_lock ($this->dn);
}
/* There's no page reload so we have to read new sudos at this point. */
//$this->reload ();
- unset ($this->grouptab);
- $this->grouptab= NULL;
+ unset ($this->sudotabs);
+ $this->sudotabs= NULL;
session::un_set('objectinfo');
}
} else {
/********************
- Edit multiple entries
+ Edit existing role
********************/
/* User wants to edit data? */
- if ($s_action == "multiple_edit" && !isset($this->grouptab->config)){
-
- $this->dn = array();
- foreach($this->list_get_selected_items() as $id){
- $this->dn[] = $this->list[$id]['dn'];;
- }
- $tmp = new multi_plug($this->config,"grouptabs",$this->config->data['TABS']['GROUPTABS'],
- $this->dn,$this->DivListSudo->selectedBase,"groups");
- if ($tmp->entries_locked()){
- return($tmp->display_lock_message());
- }
- $tmp->lock_entries($this->ui->dn);
- if($tmp->multiple_available()){
- $this->grouptab = $tmp;
- session::set('objectinfo',$this->grouptab->get_object_info());
- }
- }
-
-
- /********************
- Edit existing group
- ********************/
-
- /* User wants to edit data? */
- if (($s_action=="edit") && (!isset($this->grouptab-> config))){
+ if (($s_action=="edit") && !is_object($this->sudotabs)){
/* Get 'dn' from posted 'uid', must be unique */
$this->dn= $this->list[trim($s_entry)]['dn'];
}
add_lock ($this->dn, $this->ui->dn);
- /* Register grouptab to trigger edit dialog */
- $this->grouptab= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $this->dn);
- $this->grouptab->set_acl_base($this->dn);
+ /* Register sudotabs to trigger edit dialog */
+ $this->sudotabs= new sudotabs($this->config,$this->config->data['TABS']['SUDOTABS'], $this->dn);
+ $this->sudotabs->set_acl_base($this->base);
session::set('objectinfo',$this->dn);
}
$ids = $this->list_get_selected_items();
if(count($ids)){
-
foreach($ids as $id){
$dn = $this->list[$id]['dn'];
if (($user= get_lock($dn)) != ""){
}
/* Lock the current entry, so nobody will edit it during deletion */
- $smarty->assign("info", msgPool::deleteInfo($dns_names,_("group")));
+ $smarty->assign("info", msgPool::deleteInfo($dns_names,_("sudo role")));
$smarty->assign("multiple", true);
return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
}
Delete MULTIPLE entries confirmed
********************/
- /* Confirmation for deletion has been passed. Groups should be deleted. */
- if (isset($_POST['delete_multiple_groups_confirm'])){
+ /* Confirmation for deletion has been passed. Sudo should be deleted. */
+ if (isset($_POST['delete_multiple_sudos_confirmed'])){
/* Remove user by user and check acls before removeing them */
foreach($this->dns as $key => $dn){
/* Load permissions for selected 'dn' and check if
we're allowed to remove this 'dn' */
- $acl = $this->ui->get_permissions($dn,"groups/group");
+ $acl = $this->ui->get_permissions($dn,"sudo/sudo");
if(preg_match("/d/",$acl)){
/* Delete request is permitted, perform LDAP action */
- $this->grouptab= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $dn);
- $this->grouptab->set_acl_base($dn);
- $this->grouptab->delete ();
- unset ($this->grouptab);
- $this->grouptab= NULL;
+ $this->sudotabs= new sudotabs($this->config,$this->config->data['TABS']['SUDOTABS'], $dn);
+ $this->sudotabs->set_acl_base($dn);
+ $this->sudotabs->delete ();
+ unset ($this->sudotabs);
+ $this->sudotabs= NULL;
} else {
/* Normally this shouldn't be reached, send some extra
logs to notify the administrator */
msg_dialog::display(_("Permission error"), msgPool::permDelete(), ERROR_DIALOG);
- new log("security","groups/".get_class($this),$dn,array(),"Tried to trick deletion.");
+ new log("security","sudo/".get_class($this),$dn,array(),"Tried to trick deletion.");
}
/* Remove lock file after successfull deletion */
del_lock ($dn);
/********************
- Delete group
+ Delete sudo role
********************/
- /* Remove group was requested */
+ /* Remove sudo was requested */
if ($s_action=="del"){
/* Get 'dn' from posted 'uid' */
/* Load permissions for selected 'dn' and check if
we're allowed to remove this 'dn' */
- $acl = $this->ui->get_permissions($this->dn,"groups/group");
+ $acl = $this->ui->get_permissions($this->dn,"sudo/sudo");
if(preg_match("/d/",$acl)){
/* Check locking, save current plugin in 'back_plugin', so
/* Lock the current entry, so nobody will edit it during deletion */
add_lock ($this->dn, $this->ui->dn);
- $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("group")));
+ $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("sudo role")));
$smarty->assign("multiple", false);
return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
/********************
- Delete group confirmed
+ Delete sudo confirmed
********************/
- /* Confirmation for deletion has been passed. Group should be deleted. */
- if (isset($_POST['delete_group_confirm'])){
+ /* Confirmation for deletion has been passed. Sudo should be deleted. */
+ if (isset($_POST['delete_sudo_confirmed'])){
/* Some nice guy may send this as POST, so we've to check
for the permissions again. */
- $acl = $this->ui->get_permissions($this->dn,"groups/group");
+ $acl = $this->ui->get_permissions($this->dn,"sudo/sudo");
if(preg_match("/d/",$acl)){
/* Delete request is permitted, perform LDAP action */
- $this->grouptab= new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], $this->dn);
- $this->grouptab->set_acl_base($this->dn);
- $this->grouptab->delete ();
- unset ($this->grouptab);
- $this->grouptab= NULL;
+ $this->sudotabs= new sudotabs($this->config,$this->config->data['TABS']['SUDOTABS'], $this->dn);
+ $this->sudotabs->set_acl_base($this->dn);
+ $this->sudotabs->delete ();
+ unset ($this->sudotabs);
+ $this->sudotabs= NULL;
- /* Group list has changed, reload it. */
+ /* Sudo list has changed, reload it. */
//$this->reload ();
} else {
/* Normally this shouldn't be reached, send some extra
logs to notify the administrator */
msg_dialog::display(_("Permission error"), msgPool::permDelete(), ERROR_DIALOG);
- new log("security","groups/".get_class($this),$dn,array(),"Tried to trick deletion.");
+ new log("security","sudo/".get_class($this),$dn,array(),"Tried to trick deletion.");
}
/* Remove lock file after successfull deletion */
/********************
- Delete group canceled
+ Delete sudo canceled
********************/
- /* Delete group canceled? */
+ /* Delete sudo canceled? */
if (isset($_POST['delete_cancel'])){
del_lock ($this->dn);
session::un_set('objectinfo');
********************/
/* Cancel dialogs */
- if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){
- if(isset($this->grouptab->dn)){
- del_lock ($this->grouptab->dn);
+ if (isset($_POST['edit_cancel'])){
+ if(isset($this->sudotabs->dn)){
+ del_lock ($this->sudotabs->dn);
}
- unset ($this->grouptab);
- $this->grouptab= NULL;
+ unset ($this->sudotabs);
+ $this->sudotabs= NULL;
session::un_set('objectinfo');
}
********************/
/* Show tab dialog if object is present */
- if (isset($this->grouptab->config)){
- $display= $this->grouptab->execute();
+ if (isset($this->sudotabs->config)){
+ $display= $this->sudotabs->execute();
/* Don't show buttons if tab dialog requests this */
- if(isset($this->grouptab->by_object)){
- if (!$this->grouptab->by_object[$this->grouptab->current]->dialog){
+ if(isset($this->sudotabs->by_object)){
+ if (!$this->sudotabs->by_object[$this->sudotabs->current]->dialog){
$display.= "<p style=\"text-align:right\">\n";
$display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
$display.= " \n";
return ($display);
}
- /* Display dialog with group list */
+ /* Display dialog with sudo list */
$this->DivListSudo->parent = &$this;
$this->DivListSudo->execute();
$this->reload ();
Create filter depending on selected checkboxes
********************/
$values = array("cn","description","sudoUser","sudoCommand","sudoOption");
- $ff = "(&(|(cn=".$Regex.")(description=".$Regex.")(sudoUser=".$UserRegex.")(objectClass=sudoRole)))";
+ $ff = "(&(|(cn=".$Regex.")(description=".$Regex."))(sudoUser=".$UserRegex.")(objectClass=sudoRole))";
$res = get_list($ff, "sudo",$base,$values, GL_SUBSEARCH);
$tmp = array();
foreach($res as $attrs){
$tmp[$attrs['cn'][0]] = $attrs;
}
uksort($tmp, 'strnatcasecmp');
- $this->list = $tmp;
+ $this->list = array_values($tmp);
}
function remove_lock()
{
- if (isset($this->grouptab->dn)){
- del_lock ($this->grouptab->dn);
+ if (isset($this->sudotabs->dn)){
+ del_lock ($this->sudotabs->dn);
}
}
index 2c965ef0fd4cc162aeeeb3e9b12b592f9a16820b..8c692e3f97c4eafd1066eb91f70975228f7f7b48 100644 (file)
-{if $multiple_support}
-<input type="hidden" value="1" name="group_mulitple_edit">
-{/if }
-
-
-<table summary="" style="width:100%;">
- <tr>
- <td style="width:50%; vertical-align:top;">
- <table summary="" style="width:100%">
- <tr>
- <td><LABEL for="cn">{t}Group name{/t}</LABEL>{$must}</td>
- <td>
-{if $multiple_support}
- <input id="dummy1" name="dummy1" size=25 maxlength=60 value="{t}Multiple edit{/t}" disabled>
-{else}
-{render acl=$cnACL}
- <input id="cn" name="cn" size=25 maxlength=60 value="{$cn}" title="{t}Posix name of the group{/t}">
-{/render}
-{/if}
- </td>
- </tr>
- <tr>
- <td>
- <LABEL for="description">{t}Description{/t}</LABEL>
- </td>
- <td>
-{render acl=$descriptionACL checkbox=$multiple_support checked=$use_description}
- <input id="description" name="description" size=40 maxlength=80 value="{$description}" title="{t}Descriptive text for this group{/t}">
-{/render}
- </td>
- </tr>
- <tr>
- <td colspan=2>
- <div style="height:15px;"></div>
- </td>
- </tr>
- <tr>
- <td>
- <LABEL for="base">{t}Base{/t}</LABEL>{$must}
- </td>
- <td>
-{render acl=$baseACL checkbox=$multiple_support checked=$use_base}
- <select id="base" size="1" name="base" title="{t}Choose subtree to place group in{/t}">
- {html_options options=$bases selected=$base_select}
- </select>
-{/render}
-
-{render acl=$baseACL disable_picture='images/folder_gray.png'}
- <input type="image" name="chooseBase" src="images/folder.png" class="center" title="{t}Select a base{/t}">
-{/render}
- </td>
- </tr>
- <tr>
- <td colspan=2> <div style="height:15px; width:100%; border-bottom:1px solid #909090;"></div> </td>
- </tr>
- <tr>
- <td colspan=2> <div style="height:15px; width:100%;"></div> </td>
- </tr>
-{if $multiple_support}
-
-{else}
- <tr>
- <td colspan=2>
-{render acl=$gidNumberACL}
- <input type=checkbox name="force_gid" value="1" title="{t}Normally IDs are autogenerated, select to specify manually{/t}"
- {$force_gid} onclick="changeState('gidNumber')">
-{/render}
- <LABEL for="gidNumber">{t}Force GID{/t}</LABEL>
-
-{render acl=$gidNumberACL}
- <input name="gidNumber" size=9 maxlength=9 id="gidNumber" {$forceMode} value="{$gidNumber}" title="{t}Forced ID number{/t}">
-{/render}
- </td>
- </tr>
-{/if}
-
-{if $samba3 ne ""}
-
-{if $multiple_support}
- <tr>
- <td colspan=2>
- {render acl=$sambaGroupTypeACL checkbox=$multiple_support checked=$use_smbgroup}
- <input class="center" type=checkbox name="smbgroup" value="1" {$smbgroup}>{t}Select to create a samba conform group{/t}
- {/render}
- </td>
- </tr>
- <tr>
- <td colspan=2>
- {render acl=$sambaGroupTypeACL checkbox=$multiple_support checked=$use_groupType}
- <select size="1" name="groupType">
- {html_options options=$groupTypes selected=$groupType}
- </select>
- {/render}
-
- <LABEL for="">{t}in domain{/t}</LABEL>
-
-
- {render acl=$sambaDomainNameACL checkbox=$multiple_support checked=$use_sambaDomainName}
- <select id="sambaDomainName" size="1" name="sambaDomainName">
- {html_options values=$sambaDomains output=$sambaDomains selected=$sambaDomainName}
- </select>
- {/render}
- </td>
- </tr>
-
-{else}
- <tr>
- <td colspan=2>
-{render acl=$sambaGroupTypeACL}
- <input type=checkbox name="smbgroup" value="1" {$smbgroup} title="{t}Select to create a samba conform group{/t}">
-{/render}
-{render acl=$sambaGroupTypeACL}
- <select size="1" name="groupType">
- {html_options options=$groupTypes selected=$groupType}
- </select>
-{/render}
-
- <LABEL for="">{t}in domain{/t}</LABEL>
-
-{render acl=$sambaDomainNameACL}
- <select id="sambaDomainName" size="1" name="sambaDomainName">
- {html_options values=$sambaDomains output=$sambaDomains selected=$sambaDomainName}
- </select>
-{/render}
- </td>
- </tr>
- {/if}
-{/if}
-
- {if $pickupGroup == "true"}
- <tr>
- <td colspan=2> <div style="height:15px; width:100%; border-bottom:1px solid #909090;"></div> </td>
- </tr>
- <tr>
- <td colspan=2> <div style="height:15px; width:100%;"></div> </td>
- </tr>
- <tr>
- <td colspan=2>
-{render acl=$fonGroupACL checkbox=$multiple_support checked=$use_fon_group}
- <input class="center" type=checkbox name="fon_group" value="1" {$fon_group}>{t}Members are in a phone pickup group{/t}
-{/render}
- </td>
- </tr>
- {/if}
- {if $nagios == "true"}
- <tr>
- <td colspan=2> <div style="height:15px; width:100%; border-bottom:1px solid #909090;"></div> </td>
- </tr>
- <tr>
- <td colspan=2> <div style="height:15px; width:100%;"></div> </td>
- </tr>
- <tr>
- <td colspan=2>
-{render acl=$nagiosGroupACL}
- <input type=checkbox name="nagios_group" value="1" {$nagios_group}>{t}Members are in a nagios group{/t}
-{/render}
- </td>
- </tr>
- {/if}
- <tr>
- <td colspan=2> <div style="height:15px; width:100%; border-bottom:1px solid #909090;"></div> </td>
- </tr>
- <tr>
- <td colspan=2> <div style="height:15px; width:100%;"></div> </td>
- </tr>
- <tr>
- <td colspan="2">
- {t}Trust mode{/t}
- {render acl=$trustmodeACL}
- <select name="trustmode" id="trustmode" size=1
- onChange="changeSelectState('trustmode', 'wslist');
- changeSelectState('trustmode', 'add_ws');
- changeSelectState('trustmode', 'del_ws');">
- {html_options options=$trustmodes selected=$trustmode}
- </select>
- {/render}
- {render acl=$trustmodeACL}
- <select style="width:100%" id="wslist" name="workstation_list[]" size=8 multiple {$trusthide}>
- {html_options values=$workstations output=$workstations}
- {if $emptyArrAccess}
- <option disabled> </option>
- {/if}
- </select>
- {/render}
- <br>
- {render acl=$trustmodeACL}
- <input type="submit" id="add_ws" value="{msgPool type=addButton}" name="add_ws" {$trusthide}>
- {/render}
- {render acl=$trustmodeACL}
- <input type="submit" id="del_ws" value="{msgPool type=delButton}" name="delete_ws" {$trusthide}>
- {/render}
-
- </td>
- </tr>
- </table>
-
- </td>
- <td style="border-left:1px solid #A0A0A0">
-
- </td>
-
- <td style="vertical-align:top;">
-
- <table summary="" style="width:100%">
- <tr>
- <td style="vertical-align:top; width:50%">
- <b><LABEL for="members">{t}Group members{/t}</LABEL></b>
- <br>
-{render acl=$memberUidACL}
-
- {if $multiple_support}
- <select style="width:100%; height:380px;" id="members" name="members[]" size=15 multiple>
- {foreach from=$memberUid_All item=name key=key}
- <option value="{$key}">{$name} ({t}In all groups{/t})</option>
- {/foreach}
- {foreach from=$memberUid_Some item=name key=key}
- <option value="{$key}" style='color: #888888; background: #DDDDDD;background-color: #DDDDDD;'>{$name} ({t}Not in all groups{/t})</option>
- {/foreach}
- </select>
- {else}
- <select style="width:100%; height:380px;" id="members" name="members[]" size=15 multiple>
- {html_options options=$members}
- <option disabled> </option>
- </select>
- {/if}
-{/render}
- <br>
- <input type=submit name="edit_membership" value="{msgPool type=addButton}">
-
- <input type=submit name="del_users" value="{msgPool type=delButton}">
- </td>
- </tr>
- </table>
- </td>
-
- </tr>
-</table>
-
-<input type="hidden" name="groupedit" value="1">
-
-<!-- Place cursor -->
-<script language="JavaScript" type="text/javascript">
- <!-- // First input field on page
- focus_field('cn');
- -->
-</script>
+<h2>Sudo generic</h2>
diff --git a/gosa-core/plugins/admin/sudo/tabs_sudo.inc b/gosa-core/plugins/admin/sudo/tabs_sudo.inc
index f4f51ed9c29dd26c8ddee9de9f73a0313df13c8d..5f36dcddb60d4671d09b22386fe7e27985d86279 100644 (file)
function save($ignore_account= FALSE)
{
- echo "nope";
- $baseobject= $this->by_object['group'];
+ $baseobject= $this->by_object['sudo'];
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
- $new_dn= 'cn='.$baseobject->cn.','.get_groups_ou().$baseobject->base;
-
+ $new_dn= 'cn='.$baseobject->cn.','.get_ou("sudoou");
/* Move group? */
if ($this->dn != $new_dn){
if ($this->dn != "new"){
$baseobject->update_acls($this->dn,$new_dn);
$baseobject->move($this->dn, $new_dn);
- $this->by_object['group']= $baseobject;
+ $this->by_object['sudo']= $baseobject;
}
/* Happen to use the new one */
$this->dn= $new_dn;
}
-
$ret= tabs::save();
-
return $ret;
}
}