+ # Check if we have to parse the user config file
+
+ if($ENV{'REMOTE_USER'} && $config->{'userconf_file'} && -f $config->{'userconf_file'})
+ {
+ 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
+ # Overwrite the default values
+
+ my $new_conf = $userconf->{$ENV{'REMOTE_USER'}};
+
+ $config->{'fileroot'} = $new_conf->{'fileroot'} if($new_conf->{'fileroot'});
+ $config->{'httproot'} = $new_conf->{'httproot'} if($new_conf->{'httproot'});
+
+ $config->{'forbidden'} = $new_conf->{'forbidden'} if(defined $new_conf->{'forbidden'});
+
+ $config->{'user_config'} = 1;
+ }
+ }
+