]> source.dussan.org Git - archiva.git/commitdiff
PR: MRM-246
authorMaria Odea B. Ching <oching@apache.org>
Thu, 7 Dec 2006 04:08:03 +0000 (04:08 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Thu, 7 Dec 2006 04:08:03 +0000 (04:08 +0000)
Added display of error messages when an account is locked after 3 unsuccessful login attempts.

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@483341 13f79535-47bb-0310-9956-ffa450edef68

archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java
archiva-webapp/src/main/resources/xwork.xml
archiva-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp

index bc6f4432163230a04463ab40687a9d6e50b99e36..97ec432bcfcc9c0908e882ce8584cfa003552749 100644 (file)
@@ -80,6 +80,8 @@ public class SearchAction
 
     private static final String ARTIFACT = "artifact";
 
+    private String infoMessage;
+
     public String quickSearch()
         throws MalformedURLException, RepositoryIndexException, RepositoryIndexSearchException,
         ConfigurationStoreException, ParseException
@@ -185,4 +187,14 @@ public class SearchAction
     {
         return searchResults;
     }
+
+    public String getInfoMessage()
+    {
+        return infoMessage;
+    }
+
+    public void setInfoMessage( String infoMessage )
+    {
+        this.infoMessage = infoMessage;
+    }
 }
index 0b7f19c8f2ad6c2b24cbcba375ff046660358c6a..b996394c3d11cafa652a106d34ccf4b74c07228e 100644 (file)
       <!-- The following security-* result names arrive from the plexus-security package -->
       <result name="security-login-success" type="redirect-action">index</result>
       <result name="security-login-cancel" type="redirect-action">index</result>
-      <result name="security-login-locked" type="redirect-action">index</result>
+      <result name="security-login-locked" type="redirect-action">
+        <param name="infoMessage">Account Locked</param>
+        <param name="actionName">index</param>           
+      </result>
       <result name="security-logout" type="redirect-action">index</result>
       <result name="requires-authentication" type="redirect-action">
         <param name="actionName">login</param>
index 82ed0351c63e3910c84af024e01abee30eeecc67..8fed222dd5ae9d1c40727f5bb4f16d27538b6372 100644 (file)
   <ww:head />
 </head>
 
+<ww:if test="%{infoMessage != null}">
+   <p>${infoMessage}</p>
+</ww:if>
+
 <body>
 
 <h1>Search</h1>