Non-Users no longer see nor can edit the groups they belong to.
[licom.git] / mutt-licom.pl
index c4d5750..08c2502 100755 (executable)
@@ -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 (<<ERROR);
+The configuration has not been found or is not complete. At least the options
+uri, bind_dn and password are needed.
+ERROR
+}
 
 $Config->{'base_dn'} = $Config->{'bind_dn'} unless (defined ($Config->{'base_dn'}));