mirror of
https://github.com/webmin/webmin.git
synced 2025-07-23 00:30:33 +00:00
Allow editing of LDAP group description
This commit is contained in:
@ -69,3 +69,5 @@ Added a Module Config option to use a text box for entering secondary group memb
|
||||
---- Changes since 1.490 ----
|
||||
Improve the user and group rename code to not move the DN to be under the global base if not needed.
|
||||
Modifying a user now correctly changes the sn attribute too.
|
||||
---- Changes since 1.500 ----
|
||||
Added a field for editing the description for LDAP groups.
|
||||
|
@ -17,6 +17,7 @@ else {
|
||||
$group = $ginfo->get_value('cn');
|
||||
$gid = $ginfo->get_value('gidNumber');
|
||||
$pass = $ginfo->get_value('userPassword');
|
||||
$desc = $ginfo->get_value('description');
|
||||
@members = $ginfo->get_value('memberUid');
|
||||
foreach $oc ($ginfo->get_value('objectClass')) {
|
||||
$oclass{$oc} = 1;
|
||||
@ -66,6 +67,10 @@ else {
|
||||
print &ui_table_row($text{'gedit_gid'},
|
||||
$gidfield);
|
||||
|
||||
# Description
|
||||
print &ui_table_row($text{'gedit_desc'},
|
||||
&ui_textbox("desc", $desc, 40));
|
||||
|
||||
# Group password (rarely used, but..)
|
||||
print &ui_table_row($text{'pass'},
|
||||
&ui_radio_table("passmode", $pass eq "" ? 0 : 1,
|
||||
|
@ -71,6 +71,7 @@ gedit_dn=Group's LDAP DN
|
||||
gedit_return=group details
|
||||
gedit_cap=Group capabilities
|
||||
gedit_samba=Samba group?
|
||||
gedit_desc=Description
|
||||
|
||||
gsave_egone=Group no longer exists!
|
||||
gsave_edelete=Failed to delete group from LDAP database : $1
|
||||
|
@ -120,6 +120,7 @@ else {
|
||||
}
|
||||
$in{'gid'} =~ /^[0-9]+$/ || &error(&text('gsave_egid', $in{'gid'}));
|
||||
$gid = $in{'gid'};
|
||||
$desc = $in{'desc'} || undef;
|
||||
@members = split(/\r?\n/, $in{members});
|
||||
if ($in{'new'} || $oldgroup ne $group) {
|
||||
# Check for collision
|
||||
@ -232,6 +233,14 @@ if (!$in{'new'}) {
|
||||
$newdn = $in{'dn'};
|
||||
}
|
||||
|
||||
# Add or remove description
|
||||
if ($desc) {
|
||||
push(@props, "description" => $desc);
|
||||
}
|
||||
else {
|
||||
push(@rprops, "description");
|
||||
}
|
||||
|
||||
# Update group properties
|
||||
$rv = $ldap->modify($newdn, replace =>
|
||||
{ "gidNumber" => $gid,
|
||||
@ -285,6 +294,9 @@ else {
|
||||
if (&in_schema($schema, "sambaGrouptype") &&
|
||||
$samba_group_schema == 3);
|
||||
}
|
||||
if ($desc) {
|
||||
push(@props, "description" => $desc);
|
||||
}
|
||||
$rv = $ldap->add($newdn, attr =>
|
||||
[ "cn" => $group,
|
||||
"gidNumber" => $gid,
|
||||
|
Reference in New Issue
Block a user