From 0bfd28f200d96adda48e595db0b85a534cc03c8b Mon Sep 17 00:00:00 2001 From: octo Date: Sat, 7 May 2005 09:32:23 +0000 Subject: [PATCH] Creating of new groups works. --- lib/LiCoM/Group.pm | 2 +- licom.cgi | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/LiCoM/Group.pm b/lib/LiCoM/Group.pm index 79530f1..7bdc500 100644 --- a/lib/LiCoM/Group.pm +++ b/lib/LiCoM/Group.pm @@ -118,7 +118,7 @@ sub create ($$$@) $entry->add (ou => $ou); $entry->add (cn => $name); $entry->add (member => [map { _cn_to_dn ($_) } (@members)]); - $entry->add (description => $desc); + $entry->add (description => $desc) if ($desc); $entry->dn ($dn); $entry->changetype ('add'); diff --git a/licom.cgi b/licom.cgi index 015c34b..2e46d19 100755 --- a/licom.cgi +++ b/licom.cgi @@ -123,7 +123,7 @@ sub action_browse my $group_esc = uri_escape ($group_name); my $desc = $group->description (); - print qq#\t\t\t
  • $group_name ($members Members)#; + print qq#\t\t\t
  • $group_name ($members Member#, ($members == 1 ? ')' : 's)'); print qq(
    \n\t\t\t\t$desc) if ($desc); print "
  • \n"; } @@ -296,6 +296,25 @@ EOF "\t\t\t\n"; } } + + my @groups = LiCoM::Group->load_by_member ($cn); + if (@groups) + { + my $num = scalar (@groups); + print "\t\t\t\n", + "\t\t\t\tGroup", ($num == 1 ? '' : 's'), "\n"; + for (my $i = 0; $i < $num; $i++) + { + my $group = $groups[$i]; + my $group_name = $group->name (); + my $group_esc = uri_escape ($group_name); + + print "\t\t\t\n" if ($i != 0); + print qq(\t\t\t\t$group_name\n), + "\t\t\t\n"; + } + } + print < -- 2.11.0