Compute macros and local groups in alphabetical order (#596)

This commit is contained in:
François-Xavier Deltombe 2013-05-21 08:18:03 +00:00
parent 355dcff030
commit 3909d708d1

View File

@ -2061,8 +2061,8 @@ sub setSessionInfo {
#@return Lemonldap::NG::Portal constant #@return Lemonldap::NG::Portal constant
sub setMacros { sub setMacros {
my $self = shift; my $self = shift;
while ( my ( $n, $e ) = each( %{ $self->{macros} } ) ) { foreach (sort keys %{ $self->{macros} }) {
$self->{sessionInfo}->{$n} = $self->safe->reval($e); $self->{sessionInfo}->{$_} = $self->safe->reval( $self->{macros}->{$_} );
} }
PE_OK; PE_OK;
} }
@ -2074,9 +2074,9 @@ sub setMacros {
sub setLocalGroups { sub setLocalGroups {
my $self = shift; my $self = shift;
my $groups = ""; my $groups = "";
while ( my ( $group, $expr ) = each %{ $self->{groups} } ) { foreach (sort keys %{ $self->{groups} } ) {
$groups .= $group . $self->{multiValuesSeparator} $groups .= $_ . $self->{multiValuesSeparator}
if ( $self->safe->reval($expr) ); if ( $self->safe->reval( $self->{groups}->{$_} ) );
} }
# Join local and UserDB groups # Join local and UserDB groups