From: octo Date: Tue, 26 Apr 2005 14:10:56 +0000 (+0000) Subject: Non-Users no longer see nor can edit the groups they belong to. X-Git-Tag: Release-0.1~2 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;ds=inline;h=efe4485ed983d6573813abf54fe6ddd9e855434b;p=licom.git Non-Users no longer see nor can edit the groups they belong to. mutt-licom now reads ~/.licomrc if it exists and is more verbose if it fails.. --- diff --git a/licom.cgi b/licom.cgi index 5abb2e6..80239b5 100755 --- a/licom.cgi +++ b/licom.cgi @@ -479,6 +479,8 @@ EOF my $print = defined ($FieldNames{$field}) ? $FieldNames{$field} : $field; my @values = @{$contacts->{$field}}; + next if (!$UserID and $field eq 'group'); + push (@values, ''); for (@values) @@ -606,6 +608,8 @@ sub action_update { my $field = $_; + next if (!$UserID and $field eq 'group'); + if (defined ($contacts->{$field})) { my $values = $contacts->{$field}; diff --git a/mutt-licom.pl b/mutt-licom.pl index c4d5750..08c2502 100755 --- a/mutt-licom.pl +++ b/mutt-licom.pl @@ -9,10 +9,29 @@ use lib ("$Bin/lib"); use LiCoM::Config (qw(get_config)); use LiCoM::Person; -our $Config = get_config (); +our $Config; -die unless (defined ($Config->{'uri'}) and defined ($Config->{'bind_dn'}) - and defined ($Config->{'password'})); +if (-e $ENV{'HOME'} . '/.licomrc') +{ + $Config = get_config ($ENV{'HOME'} . '/.licomrc'); +} +elsif (-e '/etc/licom/licom.conf') +{ + $Config = get_config ('/etc/licom/licom.conf'); +} +else +{ + $Config = get_config (); +} + +unless (defined ($Config->{'uri'}) and defined ($Config->{'bind_dn'}) + and defined ($Config->{'password'})) +{ + die (<{'base_dn'} = $Config->{'bind_dn'} unless (defined ($Config->{'base_dn'}));