continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r292728 - in /maven/continuum/trunk/continuum-web/src/main: java/org/apache/maven/continuum/web/action/Login.java java/org/apache/maven/continuum/web/model/SessionUser.java resources/templates/navigations/DefaultTop.vm
Date Fri, 30 Sep 2005 13:37:05 GMT
Author: evenisse
Date: Fri Sep 30 06:37:00 2005
New Revision: 292728

URL: http://svn.apache.org/viewcvs?rev=292728&view=rev
Log:
Show user full name in Welcome message

Modified:
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/action/Login.java
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/model/SessionUser.java
    maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/DefaultTop.vm

Modified: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/action/Login.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/action/Login.java?rev=292728&r1=292727&r2=292728&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/action/Login.java
(original)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/action/Login.java
Fri Sep 30 06:37:00 2005
@@ -52,7 +52,9 @@
         {
             SecureRunData secData = (SecureRunData) map.get( "data" );
 
-            SessionUser usr = new SessionUser( user.getUsername() );
+            SessionUser usr = new SessionUser( user.getAccountId(), user.getUsername() );
+
+            usr.setFullName( user.getFullName() );
 
             usr.setLoggedIn( true );
 

Modified: maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/model/SessionUser.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/model/SessionUser.java?rev=292728&r1=292727&r2=292728&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/model/SessionUser.java
(original)
+++ maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/model/SessionUser.java
Fri Sep 30 06:37:00 2005
@@ -26,18 +26,39 @@
 public class SessionUser
     implements User
 {
+    private int userId;
+
     private String username;
 
+    private String fullName;
+
     private boolean loggedIn;
 
-    public SessionUser( String username )
+    public SessionUser( int id, String username )
     {
+        this.userId = id;
+
         this.username = username;
     }
 
+    public int getUserId()
+    {
+        return userId;
+    }
+
     public String getUserName()
     {
         return username;
+    }
+
+    public String getFullName()
+    {
+        return fullName;
+    }
+
+    public void setFullName( String fullName)
+    {
+        this.fullName =  fullName;
     }
 
     public boolean isLoggedIn()

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/DefaultTop.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/DefaultTop.vm?rev=292728&r1=292727&r2=292728&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/DefaultTop.vm
(original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/DefaultTop.vm
Fri Sep 30 06:37:00 2005
@@ -35,6 +35,10 @@
   </div>
 
   <div>
-    Welcome, <b>Guest</b>
+    #if ( $data.getUser() )
+      Welcome, <b>$data.user.fullName</b>
+    #else
+      Welcome, <b>Guest</b>
+    #end
   </div>
 </div>



Mime
View raw message