mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Show LDAP group descriptions in list
This commit is contained in:
@@ -71,3 +71,5 @@ Improve the user and group rename code to not move the DN to be under the global
|
||||
Modifying a user now correctly changes the sn attribute too.
|
||||
---- Changes since 1.500 ----
|
||||
Added a field for editing the description for LDAP groups.
|
||||
---- Changes since 1.510 ----
|
||||
The list of groups now includes descriptions, if any are set.
|
||||
|
||||
@@ -71,7 +71,6 @@ 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
|
||||
|
||||
@@ -409,6 +409,7 @@ else {
|
||||
'gid' => $_[0]->get_value("gidNumber"),
|
||||
'pass' => $_[0]->get_value("userPassword") || "",
|
||||
'members' => join(",", @members) || "",
|
||||
'desc' => $_[0]->get_value("description"),
|
||||
);
|
||||
return %group;
|
||||
}
|
||||
@@ -456,7 +457,9 @@ local @members = split(/,/, $_[0]->{'members'});
|
||||
return ( "cn" => $_[0]->{'group'},
|
||||
"gidNumber" => $_[0]->{'gid'},
|
||||
"userPassword" => $_[0]->{'pass'},
|
||||
@members ? ( "memberUid" => \@members ) : ( ) );
|
||||
@members ? ( "memberUid" => \@members ) : ( ),
|
||||
defined($_[0]->{'desc'}) ? ( "description" => $_[0]->{'desc'} ) : ( ),
|
||||
);
|
||||
}
|
||||
|
||||
# making_changes()
|
||||
|
||||
@@ -181,6 +181,7 @@ gedit_title2=Create Group
|
||||
gedit_details=Group Details
|
||||
gedit_group=Group name
|
||||
gedit_gid=Group ID
|
||||
gedit_desc=Description
|
||||
gedit_members=Members
|
||||
gedit_oneperline=(One per line)
|
||||
gedit_homedirs=Home directories
|
||||
|
||||
@@ -2333,12 +2333,15 @@ sub groups_table
|
||||
{
|
||||
local ($groups, $formno, $noboxes, $links, $rightlinks) = @_;
|
||||
|
||||
# Work out if any groups can be edited
|
||||
# Work out if any groups can be edited or have descriptions
|
||||
local $anyedit;
|
||||
local $anydesc;
|
||||
foreach my $g (@$groups) {
|
||||
if (!$g->{'noedit'}) {
|
||||
$anyedit = 1;
|
||||
last;
|
||||
}
|
||||
if ($g->{'desc'}) {
|
||||
$anydesc = 1;
|
||||
}
|
||||
}
|
||||
$anyedit = 0 if ($noboxes);
|
||||
@@ -2359,6 +2362,7 @@ print &ui_columns_start([
|
||||
$anyedit ? ( "" ) : ( ),
|
||||
$text{'gedit_group'},
|
||||
$text{'gedit_gid'},
|
||||
$anydesc ? ( $text{'gedit_desc'} ) : ( ),
|
||||
$text{'gedit_members'} ], 100, 0, \@tds);
|
||||
local $g;
|
||||
foreach $g (@$groups) {
|
||||
@@ -2370,6 +2374,9 @@ foreach $g (@$groups) {
|
||||
}
|
||||
push(@cols, &group_link($g));
|
||||
push(@cols, $g->{'gid'});
|
||||
if ($anydesc) {
|
||||
push(@cols, $g->{'desc'});
|
||||
}
|
||||
push(@cols, &html_escape($members));
|
||||
if ($g->{'noedit'} || !$access{'gdelete'}) {
|
||||
print &ui_columns_row(\@cols, \@tds);
|
||||
|
||||
Reference in New Issue
Block a user