Commit 2735520c authored by Xavier Guimard's avatar Xavier Guimard

Don't use "login" to display errors for connected users (#595)

parent 11e6cd21
......@@ -142,16 +142,11 @@ sub display {
}
# 2.2 Case : display menu (with error or not)
elsif ( $req->error == PE_OK or ( $req->userData and %{ $req->userData } ) )
{
elsif ( $req->error == PE_OK ) {
$skinfile = 'menu';
#utf8::decode($auth_user);
%templateParams = (
AUTH_ERROR => $req->error,
AUTH_ERROR_TYPE => $req->error_type,
AUTH_USER => $req->{sessionInfo}->{ $self->conf->{portalUserAttr} },
NEWWINDOW => $self->conf->{portalOpenLinkInNewWindow},
LOGOUT_URL => $self->conf->{portal} . "?logout=1",
......@@ -161,6 +156,15 @@ sub display {
);
}
# 2.3 Case : user authenticated but an error was returned (bas url,...)
elsif ( $req->userData and %{ $req->userData } ) {
$skinfile = 'error';
%templateParams = (
AUTH_ERROR => $req->error,
AUTH_ERROR_TYPE => $req->error_type,
);
}
# 3 Authentication has been refused OR first access
else {
$skinfile = 'login';
......
<TMPL_INCLUDE NAME="header.tpl">
<div id="errorcontent" class="container">
<TMPL_IF AUTH_ERROR>
<div class="message message-<TMPL_VAR NAME="AUTH_ERROR_TYPE"> alert"><span trmsg="<TMPL_VAR NAME="AUTH_ERROR">"></span></div>
</TMPL_IF>
<TMPL_IF ERROR403>
<div class="message message-negative alert">
<span trspan="accessDenied">You have no access authorization for this application</span>
......@@ -21,7 +22,6 @@
</TMPL_IF>
<div id="error">
<TMPL_IF URL>
<div class="message message-warning alert">
<span trspan="redirectedFrom">You were redirect from </span>
......@@ -41,9 +41,6 @@
</a>
</TMPL_IF>
</div>
</div>
</div>
<TMPL_INCLUDE NAME="footer.tpl">
......@@ -8,6 +8,9 @@
</div>
<p></p>
<div id="content-all-info">
<TMPL_IF NAME="AUTH_ERROR">
<h3 trmsg="<TMPL_VAR NAME="AUTH_ERROR">"></h3>
</TMPL_IF>
<TMPL_IF ERROR403>
<h3 trspan="accessDenied">You have no access authorization for this application</h3>
</TMPL_IF>
......
......@@ -2,6 +2,10 @@
<div id="errorcontent">
<TMPL_IF NAME="AUTH_ERROR">
<div class="message <TMPL_VAR NAME="AUTH_ERROR_TYPE">"><ul><li trmsg="<TMPL_VAR NAME="AUTH_ERROR">"></li></ul></div>
</TMPL_IF>
<TMPL_IF ERROR403>
<div class="message negative"><ul><li><span trspan="accessDenied">You have no access authorization for this application</span></li></ul></div>
</TMPL_IF>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment