]> source.dussan.org Git - archiva.git/blob
5aeb799dd7c391524dfb77157e7cbe23e9d7a90d
[archiva.git] /
1 <%--
2   ~
3   ~ Licensed under the Apache License, Version 2.0 (the "License");
4   ~ you may not use this file except in compliance with the License.
5   ~ You may obtain a copy of the License at
6   ~
7   ~      http://www.apache.org/licenses/LICENSE-2.0
8   ~
9   ~ Unless required by applicable law or agreed to in writing, software
10   ~ distributed under the License is distributed on an "AS IS" BASIS,
11   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   ~ See the License for the specific language governing permissions and
13   ~ limitations under the License.
14   --%>
15
16 <%@ taglib uri="/struts-tags" prefix="s" %>
17 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
18 <%@ taglib uri="/redback/taglib-1.0" prefix="redback" %>
19
20 <span class="securityLinks">
21
22 <c:choose>
23   <c:when test="${sessionScope.securitySession.authenticated != true}">
24     <s:url id="loginUrl" action="login" namespace="/security" includeParams="none"/>  
25     <s:url id="registerUrl" action="register" namespace="/security" includeParams="none"/>
26     <s:a id="loginLink" href="%{loginUrl}"><s:text name="login"/></s:a><redback:isNotReadOnlyUserManager> - <s:a id="registerLink" href="%{registerUrl}"><s:text name="register"/></s:a></redback:isNotReadOnlyUserManager>
27   </c:when>
28   <c:otherwise>
29     <s:url id="logoutUrl" action="logout" namespace="/security" includeParams="none"/>
30     <s:url id="accountUrl" action="account" namespace="/security" includeParams="none" />
31     
32     <s:text name="current.user"/>
33     <c:choose>
34       <c:when test="${sessionScope.securitySession.user != null}">
35         <span class="fullname"><s:a href="%{accountUrl}" cssClass="edit"><c:out value="${sessionScope.securitySession.user.fullName}" /></s:a></span>
36         (<span class="username"><c:out value="${sessionScope.securitySession.user.username}" /></span>)
37       </c:when>
38       <c:otherwise>
39         <span class="fullname"><s:text name="%{unknown.user}"/></span>
40       </c:otherwise>
41     </c:choose>
42     
43     <redback:isNotReadOnlyUserManager>
44     - <s:a id="editUserLink" href="%{accountUrl}" cssClass="edit"><s:text name="edit.details"/></s:a>
45     </redback:isNotReadOnlyUserManager>
46     - <s:a id="logoutLink" href="%{logoutUrl}" cssClass="logout"><s:text name="logout"/></s:a>
47     
48     <c:if test="${sessionScope.passwordExpirationNotification != null}">
49     - <s:text name="notify.password.expiration"/> ${sessionScope.passwordExpirationNotification}
50     </c:if>
51   </c:otherwise>
52 </c:choose>
53
54 </span>