Commit 8014817f authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Côme Bernigaud
Browse files

Fixes: #2608 groupManagement now based on simpleManagement

Conflicts:
	plugins/admin/groups/class_group.inc
	plugins/admin/groups/class_groupManagement.inc
	plugins/admin/groups/generic.tpl
	plugins/admin/groups/group-filter.xml
	plugins/admin/groups/group-list.xml
	plugins/admin/groups/tabs_group.inc
Showing with 0 additions and 302 deletions
+0 -302
<table style="width:100%;">
<tr>
<td style="width:50%; vertical-align:top;">
<table style="width:100%">
<tr>
<td><LABEL for="cn">{t}Group name{/t}</LABEL>{$must}</td>
<td>
{render acl=$cnACL}
<input type='text' id="cn" name="cn" size=25 maxlength=60 value="{$cn}" title="{t}Posix name of the group{/t}">
{/render}
</td>
</tr>
<tr>
<td>
<LABEL for="description">{t}Description{/t}</LABEL>
</td>
<td>
{render acl=$descriptionACL}
<input type='text' 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}
{$base}
{/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>
<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>
&nbsp;
{render acl=$gidNumberACL}
<input type='text' name="gidNumber" size=9 maxlength=9 id="gidNumber" {$forceMode} value="{$gidNumber}" title="{t}Forced ID number{/t}">
{/render}
</td>
</tr>
<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}
&nbsp;
<LABEL for="">{t}in domain{/t}</LABEL>
&nbsp;
{render acl=$sambaDomainNameACL}
<select id="sambaDomainName" size="1" name="sambaDomainName">
{html_options values=$sambaDomains output=$sambaDomains selected=$sambaDomainName}
</select>
{/render}
</td>
</tr>
{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}
<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 class="center" 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}&nbsp;
{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>&nbsp;</option>
{/if}
</select>
{/render}
<br>
{render acl=$trustmodeACL}
<input type="submit" id="add_ws" value="{msgPool type=addButton}" name="add_ws" {$trusthide}>&nbsp;
{/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">
&nbsp;
</td>
<td style="vertical-align:top;">
<table 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}
<select style="width:100%; height:380px;" id="members" name="members[]" size=15 multiple>
{html_options options=$members}
<option disabled>&nbsp;</option>
</select>
{/render}
<br>
{render acl=$memberUidACL}
<input type=submit name="edit_membership" value="{msgPool type=addButton}">
{/render}
&nbsp;
{render acl=$memberUidACL}
<input type=submit name="del_users" value="{msgPool type=delButton}">
{/render}
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="groupedit" value="1">
<!-- Place cursor -->
<script type="text/javascript">
<!-- // First input field on page
focus_field('cn');
-->
</script>
<h2>{t}Group settings{/t}</h2>
<table width='100%'>
<tr>
<td style='width:150px;'>
{t}Group name{/t}
</td>
<td>
<input type='text' id='cn' name='cn' size='35' maxlength='60' value='{$cn}' title='{t}Posix name of the group{/t}'>
</td>
</tr>
<tr>
<td>
<input type=checkbox name='force_gid' value='1' {$used} title='{t}Normally IDs are autogenerated, select to specify manually{/t}'
onclick='changeState("gidNumber")'>
<LABEL for='gidNumber'>{t}Force GID{/t}</LABEL>
</td>
<td>
<input type='text' name='gidNumber' size=9 maxlength=9 id='gidNumber' {$dis} value='{$gidNumber}' title='{t}Forced ID number{/t}'>
</td>
</tr>
</table>
<script type="text/javascript">
focus_field('cn');
</script>
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2003 Cajus Pollmeier
Copyright (C) 2011-2015 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
class grouptabs extends tabs
{
function __construct($config, $data, $dn, $cat = "", $copied_object = NULL)
{
parent::__construct($config, $data, $dn, "group", $copied_object);
$this->addSpecialTabs();
}
function save_object($save_current = FALSE)
{
tabs::save_object($save_current);
/* Update reference, transfer variables */
$baseobject = $this->getBaseObject();
foreach ($this->by_object as $name => &$obj) {
/* Don't touch base object */
if ($name != $this->baseclass) {
$obj->parent = &$this;
$obj->cn = $baseobject->cn;
}
}
unset($obj);
}
function delete()
{
/* Put baseobjects 'cn' to mailobjects 'uid' */
$baseobject = $this->getBaseObject();
if (isset($this->by_object['mailgroup'])) {
$this->by_object['mailgroup']->uid = $baseobject->cn;
}
tabs::delete();
}
function save()
{
$baseobject = $this->getBaseObject();
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
$new_dn = 'cn='.$baseobject->cn.','.get_groups_ou().$baseobject->base;
/* Transfer attributes for mailgroup account */
if (isset($this->by_object['mailgroup'])) {
$this->by_object['mailgroup']->uid = $baseobject->cn;
$this->by_object['mailgroup']->members = $baseobject->memberUid;
}
/* Move group? */
if ($this->dn != $new_dn) {
/* Write entry on new 'dn' */
if ($this->dn != "new") {
$baseobject->update_acls($this->dn, $new_dn);
$baseobject->move($this->dn, $new_dn);
$this->by_object[$this->baseclass] = $baseobject;
}
/* Happen to use the new one */
$this->dn = $new_dn;
}
return tabs::save();
}
}
?>
  • bmortier @bmortier

    mentioned in issue #880

    By Côme Chilliet on 2017-09-02T15:02:29 (imported from GitLab)

    ·

    mentioned in issue #880

    By Côme Chilliet on 2017-09-02T15:02:29 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment