mirror of https://github.com/apache/openjpa.git
detect logged in user
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@950978 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a89c57d229
commit
df01babdcf
|
@ -71,8 +71,6 @@
|
|||
|
||||
%>
|
||||
|
||||
%>
|
||||
|
||||
<!-- Header division displays the title and right-justified current user name -->
|
||||
<!-- and a Shopping Cart icon for active sessions -->
|
||||
<div id="header">
|
||||
|
@ -82,7 +80,7 @@
|
|||
hspace="2em"/>
|
||||
<A HREF="."><span style="font-size: 24pt">OpenBooks</span></A>
|
||||
<%
|
||||
Object currentUser = session.getAttribute("user");
|
||||
Object currentUser = session.getAttribute(KEY_USER);
|
||||
boolean activeSession = currentUser != null;
|
||||
if (activeSession) {
|
||||
%>
|
||||
|
|
|
@ -50,6 +50,7 @@ corresponding Java code</a> executed on the server side.
|
|||
<div id="content" style="display: block">
|
||||
<%
|
||||
Object service = session.getAttribute(KEY_SERVICE);
|
||||
|
||||
if (service == null) {
|
||||
%>
|
||||
<A name="login"></A>
|
||||
|
@ -64,7 +65,11 @@ corresponding Java code</a> executed on the server side.
|
|||
width="111px" height="22px" border="0">
|
||||
</form>
|
||||
<%
|
||||
}
|
||||
} else {
|
||||
%>
|
||||
You have already signed in, <%= session.getAttribute(KEY_USER) %>.
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue