From 9dcc2bdbad9017fc62b6f80937f1b305648b4c37 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 11 Jun 2006 17:07:26 +0200 Subject: [PATCH] Added the possibility to change a groups description. Future plans could be: - Change the name of the group (requires changing the `dn', I guess) - Manage users (at least remove them from the group) --- lib/LiCoM/Group.pm | 2 +- licom.cgi | 94 ++++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 82 insertions(+), 14 deletions(-) diff --git a/lib/LiCoM/Group.pm b/lib/LiCoM/Group.pm index 7bdc500..39fd540 100644 --- a/lib/LiCoM/Group.pm +++ b/lib/LiCoM/Group.pm @@ -296,7 +296,7 @@ sub description $obj->{'description'} = shift; $entry->changetype ('modify'); - $entry->replace (description => $obj->{'description'}); + $entry->replace (description => [$obj->{'description'}]); $entry->update ($Ldap); } diff --git a/licom.cgi b/licom.cgi index 190a9b6..ffc4a36 100755 --- a/licom.cgi +++ b/licom.cgi @@ -63,7 +63,9 @@ our %Actions = verify => [\&html_start, \&action_verify, \&html_end], delete => [\&html_start, \&action_ask_del, \&html_end], expunge => [\&html_start, \&action_do_del, \&html_end], - vcard => \&action_vcard + vcard => \&action_vcard, + edit_group => [\&html_start, \&action_edit_group, \&html_end], + save_group => [\&html_start, \&action_save_group, \&html_end] ); read_config (); @@ -98,7 +100,7 @@ if (!$UserCN) if (!defined ($Actions{$Action})) { - die; + die ("No such action: $Action"); } if (ref ($Actions{$Action}) eq 'CODE') @@ -129,17 +131,17 @@ sub action_browse { my @groups = LiCoM::Group->all (); - print qq(\t\t

Contact Groups

\n\t\t