Portal: portalForceAuthn option was unusable with Menu password change
This commit is contained in:
parent
1f243e0a20
commit
b904587edd
@ -99,11 +99,12 @@ sub new {
|
||||
$self->{portalObject}->{sessionInfo}->{'_user'};
|
||||
|
||||
# Password modification functions (TODO merge Menu.pm in Simple.pm to inherits those functions)
|
||||
if ( exists $self->{portalObject}->{passwordDB} ) {
|
||||
# Default to LDAP
|
||||
$self->{portalObject}->{passwordDB} ||= 'LDAP';
|
||||
if ( $self->{portalObject}->{passwordDB} =~ /DBI/i ) {
|
||||
use Lemonldap::NG::Portal::PasswordDBDBI; #inherits
|
||||
use Lemonldap::NG::Portal::_DBI
|
||||
; #link protected ldap Object used to change passwords only
|
||||
; #link protected dbi Object used to change passwords only
|
||||
*_modifyPassword =
|
||||
*Lemonldap::NG::Portal::PasswordDBDBI::modifyPassword;
|
||||
*_passwordDBInit =
|
||||
@ -116,10 +117,7 @@ sub new {
|
||||
*_passwordDBInit =
|
||||
*Lemonldap::NG::Portal::PasswordDBNull::passwordDBInit;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
# Default to LDAP
|
||||
if ( $self->{portalObject}->{passwordDB} =~ /LDAP/i ) {
|
||||
use Lemonldap::NG::Portal::PasswordDBLDAP; #inherits
|
||||
use Lemonldap::NG::Portal::_LDAP
|
||||
'ldap'; #link protected ldap Object used to change passwords only
|
||||
|
@ -815,10 +815,13 @@ sub existingSession {
|
||||
my $referer = $self->referer();
|
||||
my $id = $self->{id};
|
||||
|
||||
# If coming from the portal, follow the normal process to update the session
|
||||
# If coming from the portal follow the normal process to update the session
|
||||
if ( $referer ? ( $referer =~ m#$self->{portal}#i ) : 0 ) {
|
||||
$self->lmLog( "Portal referer detected for session $id", 'debug' );
|
||||
|
||||
# Allow password modification from menu
|
||||
return PE_DONE if $self->param('newpassword');
|
||||
|
||||
# Set the user connected to retrieve updated information
|
||||
$self->{user} = $self->{sessionInfo}->{user};
|
||||
|
||||
@ -827,12 +830,10 @@ sub existingSession {
|
||||
|
||||
# Process
|
||||
$self->{error} = $self->_subProcess(
|
||||
qw(issuerDBInit
|
||||
issuerForUnAuthUser authInit userDBInit getUser
|
||||
setAuthSessionInfo setSessionInfo
|
||||
qw(issuerDBInit issuerForUnAuthUser authInit
|
||||
userDBInit getUser setAuthSessionInfo setSessionInfo
|
||||
setMacros setLocalGroups setGroups authenticate
|
||||
store buildCookie checkNotification issuerForAuthUser
|
||||
)
|
||||
store checkNotification issuerForAuthUser)
|
||||
);
|
||||
return $self->{error} || PE_DONE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user