From 2b7efc613fb570f3cced7985419850bdd5668047 Mon Sep 17 00:00:00 2001 From: pcanterino <> Date: Fri, 30 Sep 2005 17:16:32 +0000 Subject: [PATCH] You can now define alias names for users who have an individual configuration, so you don't need to define an individual sections for users with the same configuration any more. --- modules/Config/DevEdit.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/Config/DevEdit.pm b/modules/Config/DevEdit.pm index aa76b5e..ce81d08 100644 --- a/modules/Config/DevEdit.pm +++ b/modules/Config/DevEdit.pm @@ -6,7 +6,7 @@ package Config::DevEdit; # Read and parse the configuration files # # Author: Patrick Canterino -# Last modified: 2005-08-24 +# Last modified: 2005-09-30 # use strict; @@ -22,6 +22,8 @@ use base qw(Exporter); @EXPORT = qw(read_config); +use Data::Dumper; + # read_config() # # Read the configuration files of Dev-Editor @@ -45,6 +47,20 @@ sub read_config($) { my $userconf = parse_config($config->{'userconf_file'}); + # Parse aliases (we use references, so we won't get a memory + # problem so soon...) + + foreach my $user(keys(%$userconf)) + { + if(my $aliases = $userconf->{$user}->{'aliases'}) + { + foreach my $alias(parse_line('\s+',0,$aliases)) + { + $userconf->{$alias} = $userconf->{$user} unless($userconf->{$alias}); + } + } + } + if($userconf->{$ENV{'REMOTE_USER'}}) { # The current HTTP Auth user has got an individual configuration -- 2.34.1