continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r434522 - in /maven/continuum/trunk/continuum-webapp: ./ src/main/java/org/apache/maven/continuum/web/action/ src/main/java/org/apache/maven/continuum/web/interceptor/ src/main/java/org/apache/maven/continuum/web/view/jsp/ui/ src/main/mdo/ ...
Date Thu, 24 Aug 2006 20:54:26 GMT
Author: jmcconnell
Date: Thu Aug 24 13:54:22 2006
New Revision: 434522

URL: http://svn.apache.org/viewvc?rev=434522&view=rev
Log:
all the basic components we need to put the 1.0.3 security model into place for trunk with the ww refactor, some views still need to be completed for users and user groups and most of the UI still needs to have its bits wrapped with the jsp tag for authorization, but the necessary parts are in place, login and logout work as well..and the creation of the first user from the initialization process is back in place.

Added:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SessionAction.java   (contents, props changed)
      - copied, changed from r433817, maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/LoginAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserGroupManagementAction.java   (with props)
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserManagementAction.java   (with props)
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/ContinuumInterceptor.java   (with props)
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/UserInterceptor.java   (with props)
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java   (with props)
    maven/continuum/trunk/continuum-webapp/src/main/mdo/session-models.mdo
    maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo   (contents, props changed)
      - copied, changed from r433817, maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/user.jsp   (with props)
    maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroup.jsp   (with props)
    maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroups.jsp   (with props)
    maven/continuum/trunk/continuum-webapp/src/main/webapp/users.jsp   (with props)
Removed:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/LoginAction.java
    maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.xml
Modified:
    maven/continuum/trunk/continuum-webapp/pom.xml
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ConfigurationAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld
    maven/continuum/trunk/continuum-webapp/src/main/webapp/configurationEdit.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/login.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/DefaultTop.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/Menu.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp

Modified: maven/continuum/trunk/continuum-webapp/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/pom.xml?rev=434522&r1=434521&r2=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/pom.xml (original)
+++ maven/continuum/trunk/continuum-webapp/pom.xml Thu Aug 24 13:54:22 2006
@@ -56,14 +56,24 @@
         <version>1.0-alpha-8</version>
         <executions>
           <execution>
-            <id>project summary model</id>
+            <id>web summary model classes</id>
             <configuration>
-              <model>src/main/mdo/view-models.xml</model>
+              <model>src/main/mdo/view-models.mdo</model>
               <version>1.0.0</version>
             </configuration>
             <goals>
               <goal>java</goal>             
             </goals>            
+          </execution>
+          <execution>
+            <id>session model classes</id>
+            <configuration>
+              <model>src/main/mdo/session-models.mdo</model>
+              <version>1.0.0</version>
+            </configuration>
+            <goals>
+              <goal>java</goal>
+            </goals>
           </execution>
         </executions>
       </plugin>

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ConfigurationAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ConfigurationAction.java?rev=434522&r1=434521&r2=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ConfigurationAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ConfigurationAction.java Thu Aug 24 13:54:22 2006
@@ -18,11 +18,16 @@
 
 import com.opensymphony.xwork.Preparable;
 import org.apache.maven.continuum.Continuum;
-import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationStoringException;
+import org.apache.maven.continuum.model.system.ContinuumUser;
+import org.apache.maven.continuum.model.system.UserGroup;
+import org.apache.maven.continuum.security.ContinuumSecurity;
+import org.apache.maven.continuum.store.ContinuumStore;
+import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 import java.io.File;
+import java.util.Collections;
 
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
@@ -41,8 +46,23 @@
      */
     private Continuum continuum;
 
+    /**
+     * @plexus.requirement
+     */
+    private ContinuumStore store;
+
     private boolean guestAccountEnabled;
 
+    private String username;
+
+    private String password;
+
+    private String passwordTwo;
+
+    private String fullName;
+
+    private String email;
+
     private String workingDirectory;
 
     private String buildOutputDirectory;
@@ -73,9 +93,34 @@
     }
 
     public String execute()
-        throws ConfigurationStoringException
+        throws ConfigurationStoringException, ContinuumStoreException
     {
-        continuum.getConfiguration().setGuestAccountEnabled( guestAccountEnabled );
+        //todo switch this to validation
+
+        ContinuumUser adminUser = new ContinuumUser();
+
+        adminUser.setUsername( username );
+        adminUser.setPassword( password );
+        adminUser.setEmail( email );
+        adminUser.setFullName( fullName );
+        adminUser.setGroup( store.getUserGroup( ContinuumSecurity.ADMIN_GROUP_NAME ) );
+
+        store.addUser( adminUser );
+
+        if ( guestAccountEnabled )
+        {
+            continuum.getConfiguration().setGuestAccountEnabled( guestAccountEnabled );
+        }
+        else
+        {
+            continuum.getConfiguration().setGuestAccountEnabled( false );
+
+            UserGroup guestGroup = store.getUserGroup( ContinuumSecurity.GUEST_GROUP_NAME );
+
+            guestGroup.setPermissions( Collections.EMPTY_LIST );
+
+            store.updateUserGroup( guestGroup );
+        }
 
         continuum.getConfiguration().setWorkingDirectory( new File( workingDirectory ) );
 
@@ -90,7 +135,7 @@
         continuum.getConfiguration().setCompanyUrl( companyUrl );
 
         continuum.getConfiguration().setInitialized( true );
-        continuum.getConfiguration().store();            
+        continuum.getConfiguration().store();
 
         return SUCCESS;
     }
@@ -115,6 +160,56 @@
     public void setGuestAccountEnabled( boolean guestAccountEnabled )
     {
         this.guestAccountEnabled = guestAccountEnabled;
+    }
+
+    public String getUsername()
+    {
+        return username;
+    }
+
+    public void setUsername( String username )
+    {
+        this.username = username;
+    }
+
+    public String getPassword()
+    {
+        return password;
+    }
+
+    public void setPassword( String password )
+    {
+        this.password = password;
+    }
+
+    public String getPasswordTwo()
+    {
+        return passwordTwo;
+    }
+
+    public void setPasswordTwo( String passwordTwo )
+    {
+        this.passwordTwo = passwordTwo;
+    }
+
+    public String getFullName()
+    {
+        return fullName;
+    }
+
+    public void setFullName( String fullName )
+    {
+        this.fullName = fullName;
+    }
+
+    public String getEmail()
+    {
+        return email;
+    }
+
+    public void setEmail( String email )
+    {
+        this.email = email;
     }
 
     public String getWorkingDirectory()

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java?rev=434522&r1=434521&r2=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java Thu Aug 24 13:54:22 2006
@@ -16,12 +16,11 @@
  * limitations under the License.
  */
 
+import com.opensymphony.xwork.Preparable;
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.initialization.ContinuumInitializationException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
-import com.opensymphony.xwork.Preparable;
-
 /**
  * ContinuumActionSupport
  *
@@ -32,17 +31,18 @@
     extends PlexusActionSupport
     implements Preparable
 {
-
     /**
      * @plexus.requirement
      */
     protected Continuum continuum;
-    
+
     public void prepare()
         throws Exception
     {
-        getLogger().info("checking the continuum configuration");
         
+
+        getLogger().info("checking the continuum configuration");
+
         if ( !continuum.getConfiguration().isInitialized() )
         {
             throw new ContinuumInitializationException( "continuum not initialized" );

Copied: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SessionAction.java (from r433817, maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/LoginAction.java)
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SessionAction.java?p2=maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SessionAction.java&p1=maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/LoginAction.java&r1=433817&r2=434522&rev=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/LoginAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SessionAction.java Thu Aug 24 13:54:22 2006
@@ -1,5 +1,11 @@
 package org.apache.maven.continuum.web.action;
 
+import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.model.system.ContinuumUser;
+
+import java.util.Iterator;
+import java.util.List;
+
 /*
  * Copyright 2004-2005 The Apache Software Foundation.
  *
@@ -22,32 +28,80 @@
  *
  * @plexus.component
  *   role="com.opensymphony.xwork.Action"
- *   role-hint="login"
+ *   role-hint="session"
  */
-public class LoginAction
+public class SessionAction
     extends ContinuumActionSupport
 {
-    private String username = "";
+    private String username;
 
-    private String password = "";
+    private String password;
+
+    private boolean login;
 
     private boolean rememberMe = false;
 
     /**
      * Execute the login action
      */
-    public String execute()
-        throws Exception
+    public String login()
     {
-        return INPUT;
+        try
+        {
+            if ( !login )
+            {
+                return INPUT;
+            }
+
+            List userList = continuum.getUsers();
+
+            for ( Iterator i = userList.iterator(); i.hasNext(); )
+            {
+                ContinuumUser user = (ContinuumUser)i.next();
+
+                if ( username != null && username.equals( user.getUsername() ) )
+                {
+                    if ( user.equalsPassword( password ) )
+                    {
+                        session.put( "userId", new Integer( user.getAccountId() ) );
+                        session.put( "loggedIn", new Boolean( true ) );
+                        return SUCCESS;
+                    }
+                    else
+                    {
+                        getLogger().info("invalid password");
+                        addActionError( "invalid password" );
+                        return ERROR;
+                    }
+                }
+            }
+            getLogger().info("no user by name: " + username );
+            return ERROR;
+        }
+        catch ( ContinuumException  e )
+        {
+            getLogger().info(e.getMessage() );
+            addActionError( e.getMessage() );
+            return ERROR;
+        }
+
     }
 
-    /**
-     * Redirect to login view
-     */
-    public String doDefault()
+    public String logout()
+    {
+        session.clear();
+
+        return SUCCESS;
+    }
+
+    public boolean isLogin()
+    {
+        return login;
+    }
+
+    public void setLogin( boolean login )
     {
-        return INPUT;
+        this.login = login;
     }
 
     public String getUsername()

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SessionAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SessionAction.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserGroupManagementAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserGroupManagementAction.java?rev=434522&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserGroupManagementAction.java (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserGroupManagementAction.java Thu Aug 24 13:54:22 2006
@@ -0,0 +1,95 @@
+package org.apache.maven.continuum.web.action;
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * UserManagementAction:
+ *
+ * @author Jesse McConnell <jmcconnell@apache.org>
+ * @version $Id:$
+ *
+ * @plexus.component
+ *   role="com.opensymphony.xwork.Action"
+ *   role-hint="userGroupManagement"
+ */
+public class UserGroupManagementAction
+    extends ContinuumActionSupport
+{
+    private int userGroupId;
+
+    private String name;
+
+    private String description;
+
+
+
+    private String display()
+    {
+       return SUCCESS;
+    }
+
+    private String save()
+    {
+        if ( userGroupId == 0 )
+        {
+            // add user group
+        }
+        else
+        {
+            // edit user group
+        }
+
+        return SUCCESS;
+    }
+
+    private String remove()
+    {
+        // remove user
+        return SUCCESS;
+    }
+
+
+    public int getUserGroupId()
+    {
+        return userGroupId;
+    }
+
+    public void setUserGroupId( int userGroupId )
+    {
+        this.userGroupId = userGroupId;
+    }
+
+    public String getDescription()
+    {
+        return description;
+    }
+
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserGroupManagementAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserManagementAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserManagementAction.java?rev=434522&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserManagementAction.java (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserManagementAction.java Thu Aug 24 13:54:22 2006
@@ -0,0 +1,270 @@
+package org.apache.maven.continuum.web.action;
+
+import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.model.system.ContinuumUser;
+import org.apache.maven.continuum.model.system.UserGroup;
+
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Iterator;
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * UserManagementAction:
+ *
+ * @author Jesse McConnell <jmcconnell@apache.org>
+ * @version $Id:$
+ * @plexus.component
+ *   role="com.opensymphony.xwork.Action"
+ *   role-hint="userManagement"
+ */
+public class UserManagementAction
+    extends ContinuumActionSupport
+{
+    private int userId;
+
+    private String username;
+
+    private String fullName;
+
+    private String password;
+
+    private String passwordTwo;
+
+    private String email;
+
+    private int userGroupId;
+
+    private List users;
+
+    private Map userGroups;
+
+
+    /**
+     * initialize the userGroups map since it is used on a number of pages
+     *
+     * @throws Exception
+     */
+    public void prepare()
+        throws Exception
+    {
+        super.prepare();
+
+        if ( userGroups == null )
+        {
+            userGroups = new HashMap();
+
+            for ( Iterator i = continuum.getUserGroups().iterator(); i.hasNext();)
+            {
+                UserGroup group = (UserGroup)i.next();
+                userGroups.put( new Integer( group.getId() ), group.getName() );
+            }
+        }
+    }
+
+    public String summary()
+    {
+        try
+        {
+            users = continuum.getUsers();
+        }
+        catch ( ContinuumException e )
+        {
+            getLogger().info(e.getMessage());
+            addActionError( e.getMessage() );
+            return ERROR;
+        }
+
+        return SUCCESS;
+    }
+
+    public String input()
+    {
+        if ( userId != 0 )
+        {
+            try
+            {
+                ContinuumUser user = continuum.getUser( userId );
+
+                username = user.getUsername();
+                fullName = user.getFullName();
+                email = user.getEmail();
+                userGroupId = user.getGroup().getId();
+
+            }
+            catch ( ContinuumException e )
+            {
+                addActionError( e.getMessage() );
+                return ERROR;
+            }
+        }
+
+        return SUCCESS;
+    }
+
+    public String save()
+    {
+        if ( userId == 0 )
+        {
+            try
+            {
+                ContinuumUser newUser = new ContinuumUser();
+
+                newUser.setUsername( username );
+                newUser.setFullName( fullName );
+                newUser.setEmail( email );
+                newUser.setPassword( password );
+                newUser.setGroup( continuum.getUserGroup( userGroupId ) );
+                continuum.addUser( newUser );
+            }
+            catch ( ContinuumException e )
+            {
+                addActionError( e.getMessage() );
+                return ERROR;
+            }
+        }
+        else
+        {
+            try
+            {
+                ContinuumUser editUser = continuum.getUser( userId );
+
+                editUser.setUsername( username );
+                editUser.setFullName( fullName );
+                editUser.setEmail( email );
+                editUser.setPassword( password );
+                editUser.setGroup( continuum.getUserGroup( userGroupId ) );
+                continuum.updateUser( editUser );
+
+            }
+            catch ( ContinuumException e )
+            {
+                addActionError( e.getMessage() );
+                return ERROR;
+            }
+        }
+
+        return SUCCESS;
+    }
+
+    public String remove()
+    {
+        try
+        {
+            continuum.removeUser( userId );
+        }
+        catch ( ContinuumException e )
+        {
+            addActionError( e.getMessage() );
+            return ERROR;
+        }
+
+        return SUCCESS;
+    }
+
+
+    public int getUserId()
+    {
+        return userId;
+    }
+
+    public void setUserId( int userId )
+    {
+        this.userId = userId;
+    }
+
+    public String getUsername()
+    {
+        return username;
+    }
+
+    public void setUsername( String username )
+    {
+        this.username = username;
+    }
+
+    public String getFullName()
+    {
+        return fullName;
+    }
+
+    public void setFullName( String fullName )
+    {
+        this.fullName = fullName;
+    }
+
+    public String getEmail()
+    {
+        return email;
+    }
+
+    public void setEmail( String email )
+    {
+        this.email = email;
+    }
+
+    public String getPassword()
+    {
+        return password;
+    }
+
+    public void setPassword( String password )
+    {
+        this.password = password;
+    }
+
+    public String getPasswordTwo()
+    {
+        return passwordTwo;
+    }
+
+    public void setPasswordTwo( String passwordTwo )
+    {
+        this.passwordTwo = passwordTwo;
+    }
+
+    public List getUsers()
+    {
+        return users;
+    }
+
+    public void setUsers( List users )
+    {
+        this.users = users;
+    }
+
+    public int getUserGroupId()
+    {
+        return userGroupId;
+    }
+
+    public void setUserGroupId( int userGroupId )
+    {
+        this.userGroupId = userGroupId;
+    }
+
+    public Map getUserGroups()
+    {
+        return userGroups;
+    }
+
+    public void setUserGroups( Map userGroups )
+    {
+        this.userGroups = userGroups;
+    }
+}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/UserManagementAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/ContinuumInterceptor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/ContinuumInterceptor.java?rev=434522&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/ContinuumInterceptor.java (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/ContinuumInterceptor.java Thu Aug 24 13:54:22 2006
@@ -0,0 +1,71 @@
+package org.apache.maven.continuum.web.interceptor;
+
+import com.opensymphony.xwork.ActionInvocation;
+import com.opensymphony.xwork.interceptor.Interceptor;
+import org.apache.maven.continuum.Continuum;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+
+import java.util.Map;
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * UserInterceptor:
+ *
+ * @author Jesse McConnell <jmcconnell@apache.org>
+ * @version $Id:$
+ *
+ * @plexus.component
+ *   role="com.opensymphony.xwork.interceptor.Interceptor"
+ *   role-hint="continuumInterceptor"
+ */
+public class ContinuumInterceptor
+    extends AbstractLogEnabled
+    implements Interceptor
+{
+    /**
+     * @plexus.requirement
+     */
+    private Continuum continuum;
+
+
+    /**
+     *
+     * @param actionInvocation
+     * @return
+     * @throws Exception
+     */
+
+    public String intercept( ActionInvocation actionInvocation )
+        throws Exception
+    {
+        Map session  = actionInvocation.getInvocationContext().getSession();
+
+        session.put( "continuum", continuum );
+
+        return actionInvocation.invoke();
+    }
+
+    public void destroy()
+    {
+        // This space left intentionally blank
+    }
+
+    public void init()
+    {
+        // This space left intentionally blank
+    }
+}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/ContinuumInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/UserInterceptor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/UserInterceptor.java?rev=434522&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/UserInterceptor.java (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/UserInterceptor.java Thu Aug 24 13:54:22 2006
@@ -0,0 +1,116 @@
+package org.apache.maven.continuum.web.interceptor;
+
+import com.opensymphony.xwork.ActionInvocation;
+import com.opensymphony.xwork.ActionSupport;
+import com.opensymphony.xwork.interceptor.Interceptor;
+import org.apache.maven.continuum.Continuum;
+import org.apache.maven.continuum.model.system.ContinuumUser;
+import org.apache.maven.continuum.web.model.SessionUser;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+
+import java.util.Map;
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * UserInterceptor:
+ *
+ * @author Jesse McConnell <jmcconnell@apache.org>
+ * @version $Id:$
+ *
+ * @plexus.component
+ *   role="com.opensymphony.xwork.interceptor.Interceptor"
+ *   role-hint="userInterceptor"
+ */
+public class UserInterceptor
+    extends AbstractLogEnabled
+    implements Interceptor
+{
+    /**
+     * @plexus.requirement
+     */
+    private Continuum continuum;
+
+
+    /**
+     *
+     * @param actionInvocation
+     * @return
+     * @throws Exception
+     */
+
+    public String intercept( ActionInvocation actionInvocation )
+        throws Exception
+    {
+        Map session  = actionInvocation.getInvocationContext().getSession();
+
+        Integer userId = (Integer)session.get( "userId" );
+
+        ContinuumUser continuumUser;
+
+        if ( userId != null )
+        {
+            continuumUser = continuum.getUser( userId.intValue() );
+        }
+        else
+        {
+            continuumUser = continuum.getSecurity().getGuestUser();
+        }
+
+        if ( continuumUser != null)
+        {
+
+            SessionUser sessionUser = new SessionUser();
+
+            sessionUser.setId( continuumUser.getAccountId() );
+            sessionUser.setUsername( continuumUser.getUsername() );
+            sessionUser.setFullName( continuumUser.getFullName() );
+
+            Boolean loggedIn = (Boolean)session.get( "loggedIn" );
+
+            if ( loggedIn != null )
+            {
+                sessionUser.setLoggedIn( loggedIn.booleanValue() );
+            }
+            else
+            {
+                sessionUser.setLoggedIn( false );
+            }
+
+            session.put( "user", sessionUser );
+            session.put( "userId", new Integer( sessionUser.getId() ));
+
+            actionInvocation.getInvocationContext().setSession( session );
+
+            return actionInvocation.invoke();
+        }
+        else
+        {
+            getLogger().info( "error in UserInterceptor" );
+            return ActionSupport.ERROR;
+        }
+    }
+
+    public void destroy()
+    {
+        // This space left intentionally blank
+    }
+
+    public void init()
+    {
+        // This space left intentionally blank
+    }
+}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/UserInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java?rev=434522&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java Thu Aug 24 13:54:22 2006
@@ -0,0 +1,77 @@
+package org.apache.maven.continuum.web.view.jsp.ui;
+
+import com.opensymphony.xwork.ActionContext;
+import org.apache.maven.continuum.Continuum;
+import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.model.system.ContinuumUser;
+import org.apache.maven.continuum.security.ContinuumSecurityException;
+
+import javax.servlet.jsp.JspTagException;
+import javax.servlet.jsp.jstl.core.ConditionalTagSupport;
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * IfAuthorizedTag:
+ *
+ * @author Jesse McConnell <jmcconnell@apache.org>
+ * @version $Id:$
+ */
+public class IfAuthorizedTag
+    extends ConditionalTagSupport
+
+{
+    private String permission;
+
+
+    public void setPermission( String permission )
+    {
+        this.permission = permission;
+    }
+
+    protected boolean condition()
+        throws JspTagException
+    {
+        ActionContext context = ActionContext.getContext();
+
+        try
+        {
+            Continuum continuum = (Continuum) context.getSession().get( "continuum" );
+
+            if ( continuum != null )
+            {
+                ContinuumUser user = continuum.getUser( ((Integer)context.getSession().get( "userId" )).intValue() );
+
+                return continuum.getSecurity().isAuthorized( user, permission );
+            }
+            else
+            {
+                throw new JspTagException("continuum object is null!");
+            }
+        }
+        catch ( ContinuumException e )
+        {
+            throw new JspTagException( "continuum exception", e );
+        }
+        catch ( ContinuumSecurityException e )
+        {
+            throw new JspTagException( "security exception", e );
+        }
+    }
+
+
+
+}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/continuum/trunk/continuum-webapp/src/main/mdo/session-models.mdo
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/mdo/session-models.mdo?rev=434522&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/mdo/session-models.mdo (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/mdo/session-models.mdo Thu Aug 24 13:54:22 2006
@@ -0,0 +1,78 @@
+<model>
+  <id>continuum-session-models</id>
+  <name>ContinuumSessionModels</name>
+  <defaults>
+    <default>
+      <key>package</key>
+      <value>org.apache.maven.continuum.web.model</value>
+    </default>
+  </defaults>
+  <classes>
+    <class rootElement="true">
+      <name>Session</name>
+      <version>1.0.0</version>
+      <fields>
+        <field>
+          <name>sessionUsers</name>
+          <version>1.0.0</version>
+          <description></description>
+          <required>true</required>
+          <association>
+            <type>SessionUser</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>SessionUser</name>
+      <version>1.0.0</version>
+      <fields>
+        <field>
+          <name>id</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <description>id of the user</description>
+          <type>int</type>
+        </field>
+        <field>
+          <name>username</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <description>username</description>
+          <type>String</type>
+        </field>
+        <field>
+          <name>fullName</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <description>full name of the user</description>
+          <type>String</type>
+        </field>
+        <field>
+          <name>email</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <description>email of the user</description>
+          <type>String</type>
+        </field>
+        <field>
+          <name>userGroupId</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <description>user group the user is a member of</description>
+          <type>int</type>
+        </field>
+        <field>
+          <name>loggedIn</name>
+          <version>1.0.0</version>
+          <required>true</required>
+          <description>boolean for the user is logged in or not</description>
+          <type>boolean</type>
+          <required>true</required>
+          <defaultValue>false</defaultValue>
+        </field>
+      </fields>
+    </class>
+  </classes>
+</model>
\ No newline at end of file

Copied: maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo (from r433817, maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.xml)
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo?p2=maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo&p1=maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.xml&r1=433817&r2=434522&rev=434522&view=diff
==============================================================================
    (empty)

Propchange: maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml?rev=434522&r1=434521&r2=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml Thu Aug 24 13:54:22 2006
@@ -358,7 +358,7 @@
           </level>
           <level>
             <hierarchy>com.opensymphony.webwork</hierarchy>
-            <level>INFO</level>
+            <level>DEBUG</level>
           </level>
           <level>
             <hierarchy>org.extremecomponents</hierarchy>

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?rev=434522&r1=434521&r2=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Thu Aug 24 13:54:22 2006
@@ -6,8 +6,15 @@
 
     <interceptors>
       <interceptor name="exception-logging" class="exceptionLogging"/>
+      <interceptor name="user" class="userInterceptor"/>
+      <interceptor name="continuum" class="continuumInterceptor"/>
       <interceptor-stack name="defaultContinuumStack">
+        <interceptor-ref name="user"/>
+        <interceptor-ref name="continuum"/>
         <interceptor-ref name="exception-logging"/>
+        <!--<interceptor-ref name="defaultStack"/>-->
+
+
         <interceptor-ref name="prepare"/>
         <interceptor-ref name="servlet-config"/>
         <interceptor-ref name="chain"/>
@@ -17,7 +24,7 @@
         <interceptor-ref name="static-params"/>
         <interceptor-ref name="params"/>
         <!-- interceptor-ref name="conversionError"/ -->
-        <interceptor-ref name="validation"/>
+       <interceptor-ref name="validation"/>
         <interceptor-ref name="workflow"/>
       </interceptor-stack>
     </interceptors>
@@ -48,10 +55,6 @@
       <result name="success">/components/companyLogo.jsp</result>
     </action>
 
-    <action name="login" class="login">
-      <result name="input">login.jsp</result>
-      <result name="success" type="redirect">summary.action</result>
-    </action>
 
     <action name="summary" class="summary">
       <result name="success">summary.jsp</result>
@@ -97,6 +100,51 @@
     <action name="projectSave" class="projectEdit">
       <result name="input">projectEdit.jsp</result>
       <result name="success" type="chain">projectView</result>
+    </action>
+
+    <!--
+    * Session Influencing actions
+    -->
+    <action name="login" class="session" method="login">
+      <result name="input">login.jsp</result>
+      <result name="error">login.jsp</result>
+      <result name="success" type="redirect">groupSummary.action</result>
+    </action>
+
+    <action name="logout" class="session" method="logout">
+      <result name="success" type="redirect">groupSummary.action</result>
+    </action>
+
+
+    <!--
+    * user management actions
+    -->
+    <action name="users" class="userManagement" method="summary">
+      <result name="success">users.jsp</result>
+    </action>
+
+    <action name="user" class="userManagement" method="input">
+      <result name="success">user.jsp</result>
+    </action>
+
+    <action name="saveUser" class="userManagement" method="save">
+      <result name="success" type="redirect">users</result>
+    </action>
+
+
+    <!--
+    * user group management actions
+    -->
+    <action name="userGroups" class="userGroupManagement" method="summary">
+      <result name="success">userGroups.jsp</result>
+    </action>
+
+    <action name="userGroup" class="userGroupManagement" method="input">
+      <result name="success">userGroup.jsp</result>
+    </action>
+
+    <action name="saveUserGroup" class="userGroupManagement" method="save">
+      <result name="success" type="redirect">userGroups</result>
     </action>
 
     <!--

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld?rev=434522&r1=434521&r2=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld Thu Aug 24 13:54:22 2006
@@ -107,4 +107,15 @@
     </attribute>
   </tag>
 
+  <tag>
+    <name>ifAuthorized</name>
+    <tagclass>org.apache.maven.continuum.web.view.jsp.ui.IfAuthorizedTag</tagclass>
+    <bodycontent>JSP</bodycontent>
+    <attribute>
+      <name>permission</name>
+      <required>true</required>
+      <rtexprvalue>false</rtexprvalue>
+    </attribute>
+  </tag>
+
 </taglib>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/configurationEdit.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/configurationEdit.jsp?rev=434522&r1=434521&r2=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/configurationEdit.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/configurationEdit.jsp Thu Aug 24 13:54:22 2006
@@ -1,33 +1,49 @@
 <%@ taglib uri="/webwork" prefix="ww" %>
 <%@ taglib uri="continuum" prefix="c1" %>
 <html>
-  <ww:i18n name="localization.Continuum">
-    <head>
-        <title><ww:text name="configuration.page.title"/></title>
-    </head>
-    <body>
-      <div id="axial" class="h3">
-        <h3><ww:text name="configuration.section.title"/></h3>
+<ww:i18n name="localization.Continuum">
+  <head>
+    <title><ww:text name="configuration.page.title"/></title>
+  </head>
 
-        <div class="axial">
-          <ww:form action="configuration.action" method="post">
-            <table>
-              <tbody>
-                <ww:checkbox label="%{getText('configuration.guest.label')}" name="guestAccountEnabled" value="guestAccountEnabled" fieldValue="true"/>
-                <ww:textfield label="%{getText('configuration.workingDirectory.label')}" name="workingDirectory" required="true"/>
-                <ww:textfield label="%{getText('configuration.buildOutputDirectory.label')}" name="buildOutputDirectory" required="true"/>
-                <ww:textfield label="%{getText('configuration.baseUrl.label')}" name="baseUrl" required="true"/>
-                <ww:textfield label="%{getText('configuration.companyName.label')}" name="companyName"/>
-                <ww:textfield label="%{getText('configuration.companyLogo.label')}" name="companyLogo"/>
-                <ww:textfield label="%{getText('configuration.companyUrl.label')}" name="companyUrl"/>
-              </tbody>
-            </table>
-            <div class="functnbar3">
-              <c1:submitcancel value="%{getText('save')}" cancel="%{getText('cancel')}"/>
-            </div>
-          </ww:form>
+  <body>
+  <div id="axial" class="h3">
+    <h3><ww:text name="configuration.section.title"/></h3>
+    <ww:form action="configuration.action" method="post">
+
+      <div class="axial">
+        <table border="1" cellspacing="2" cellpadding="3" width="100%">
+          <ww:textfield label="Username" name="username"/>
+          <ww:textfield label="Full Name" name="fullName"/>
+          <ww:textfield label="Email" name="email"/>
+          <ww:textfield label="Password" name="password"/>
+          <ww:textfield label="Password(again)" name="passwordTwo"/>
+        </table>
+      </div>
+
+      <div class="axial">
+
+        <table>
+          <tbody>
+            <ww:checkbox label="%{getText('configuration.guest.label')}" name="guestAccountEnabled"
+                         value="guestAccountEnabled" fieldValue="true"/>
+            <ww:textfield label="%{getText('configuration.workingDirectory.label')}" name="workingDirectory"
+                          required="true"/>
+            <ww:textfield label="%{getText('configuration.buildOutputDirectory.label')}" name="buildOutputDirectory"
+                          required="true"/>
+            <ww:textfield label="%{getText('configuration.baseUrl.label')}" name="baseUrl" required="true"/>
+            <ww:textfield label="%{getText('configuration.companyName.label')}" name="companyName"/>
+            <ww:textfield label="%{getText('configuration.companyLogo.label')}" name="companyLogo"/>
+            <ww:textfield label="%{getText('configuration.companyUrl.label')}" name="companyUrl"/>
+          </tbody>
+        </table>
+        <div class="functnbar3">
+          <c1:submitcancel value="%{getText('save')}" cancel="%{getText('cancel')}"/>
         </div>
+
       </div>
-    </body>
-  </ww:i18n>
+    </ww:form>
+  </div>
+  </body>
+</ww:i18n>
 </html>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/login.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/login.jsp?rev=434522&r1=434521&r2=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/login.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/login.jsp Thu Aug 24 13:54:22 2006
@@ -10,6 +10,8 @@
         <h3><ww:text name="login.section.title"/></h3>
         <div class="axial">
         <ww:form action="login" method="post">
+          <ww:hidden name="login" value="true"/>
+          <ww:actionerror/>
           <table>
             <tbody>
               <ww:textfield label="%{getText('login.username')}" name="username" required="true"/>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/DefaultTop.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/DefaultTop.jsp?rev=434522&r1=434521&r2=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/DefaultTop.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/DefaultTop.jsp Thu Aug 24 13:54:22 2006
@@ -27,7 +27,15 @@
   </div>
 
   <div>
-      <b><font color="red">TODO</font></b>Welcome, <b>Guest</b> - <a href="<ww:url value="login!default.action"/>">Login</a>
+    <ww:url id="loginUrl" action="login"/>
+    <ww:url id="logoutUrl" action="logout"/>
+    <ww:if test="${sessionScope.loggedIn != true}">
+      Welcome, <b>${sessionScope.user.username}</b> - <ww:a href="%{loginUrl}">Login</ww:a>
+    </ww:if>
+    <ww:else>
+      Welcome, <b>${sessionScope.user.username}</b> - <ww:a href="%{logoutUrl}">Logout</ww:a>
+    </ww:else>
+
   </div>
 </div>
 </ww:i18n>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/Menu.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/Menu.jsp?rev=434522&r1=434521&r2=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/Menu.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/Menu.jsp Thu Aug 24 13:54:22 2006
@@ -38,6 +38,14 @@
       <div class="body">
         <a href="<ww:url value="configuration!default.action"/>"><ww:text name="menu.administration.configuration"/></a>
       </div>
+      <div class="body">
+        <ww:url id="userManagementUrl" action="users"/>
+        <ww:a href="%{userManagementUrl}">Users</ww:a>
+      </div>
+      <div class="body">
+        <ww:url id="userGroupManagementUrl" action="userGroups"/>
+        <ww:a href="%{userGroupManagementUrl}">User Groups</ww:a>
+      </div>
     </div>
   </div>
   <div id="projectmenu" class="toolgroup">

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp?rev=434522&r1=434521&r2=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp Thu Aug 24 13:54:22 2006
@@ -26,6 +26,9 @@
             <c1:data label="%{getText('projectView.project.scmUrl')}" name="project.scmUrl"/>
             <c1:data label="%{getText('projectView.project.group')}" name="project.projectGroup.name"/>
           </table>
+          <!--
+            wrap this in security tag
+          -->
           <div class="functnbar3">
             <table>
               <tbody>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp?rev=434522&r1=434521&r2=434522&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp Thu Aug 24 13:54:22 2006
@@ -1,69 +1,83 @@
 <%@ taglib uri="/webwork" prefix="ww" %>
 <%@ taglib uri="/tld/extremecomponents" prefix="ec" %>
-<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
+<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %>
+<%@ taglib uri="continuum" prefix="c1" %>
 <html>
-  <ww:i18n name="localization.Continuum">
-    <head>
-        <title><ww:text name="summary.page.title"/></title>
-    </head>
-    <body>
-      <div id="h3">
-        <h3><ww:text name="summary.section.title"/></h3>
-        <%--<ww:set name="projects" value="projects" scope="request"/>--%>
-        <ec:table items="projects"
-                  var="project"
-                  showExports="false"
-                  showPagination="false"
-                  showStatusBar="false"
-                  filterable="false">
-          <ec:row highlightRow="true">
-            <ec:column property="state" title="&nbsp;" width="1%" cell="org.apache.maven.continuum.web.view.StateCell"/>
-            <ec:column property="name" title="summary.projectTable.name" width="48%">
-                <a href="<ww:url action="projectView">
+<ww:i18n name="localization.Continuum">
+  <head>
+    <title><ww:text name="summary.page.title"/></title>
+  </head>
+
+  <body>
+  <div id="h3">
+    <h3><ww:text name="summary.section.title"/></h3>
+      <%--<ww:set name="projects" value="projects" scope="request"/>--%>
+    <ec:table items="projects"
+              var="project"
+              showExports="false"
+              showPagination="false"
+              showStatusBar="false"
+              filterable="false">
+      <ec:row highlightRow="true">
+        <ec:column property="state" title="&nbsp;" width="1%" cell="org.apache.maven.continuum.web.view.StateCell"/>
+        <ec:column property="name" title="summary.projectTable.name" width="48%">
+          <a href="<ww:url action="projectView">
                   <ww:param name="projectId" value="${project.id}"/>
                 </ww:url>">${project.name}</a>
-            </ec:column>
-            <ec:column property="version" title="summary.projectTable.version" width="13%"/>
-            <ec:column property="buildNumber" title="summary.projectTable.build" width="5%" cell="org.apache.maven.continuum.web.view.BuildCell"/>
-            <ec:column property="buildNowAction" title="&nbsp;" width="1%" cell="org.apache.maven.continuum.web.view.BuildNowCell" sortable="false"/>
-            <ec:column property="buildHistoryAction" title="&nbsp;" width="1%" sortable="false">
-              <c:choose>
-                <c:when test="${pageScope.project.latestBuildId > 0}">
-                  <a href='<ww:url action="buildResults">
+        </ec:column>
+        <ec:column property="version" title="summary.projectTable.version" width="13%"/>
+        <ec:column property="buildNumber" title="summary.projectTable.build" width="5%"
+                   cell="org.apache.maven.continuum.web.view.BuildCell"/>
+        <ec:column property="buildNowAction" title="&nbsp;" width="1%"
+                   cell="org.apache.maven.continuum.web.view.BuildNowCell" sortable="false"/>
+        <ec:column property="buildHistoryAction" title="&nbsp;" width="1%" sortable="false">
+          <c:choose>
+            <c:when test="${pageScope.project.latestBuildId > 0}">
+              <a href='<ww:url action="buildResults">
                       <ww:param name="projectId" value="${project.id}"/>
-                    </ww:url>'><img src="<ww:url value='/images/buildhistory.gif'/>" alt="Build History" title="Build History" border="0"></a>
-                </c:when>
-                <c:otherwise>
-                  <img src="<ww:url value='/images/buildhistory_disabled.gif'/>" alt="Build History" title="Build History" border="0">
-                </c:otherwise>
-              </c:choose>
-            </ec:column>
-            <ec:column property="workingCopyAction" title="&nbsp;" width="1%" sortable="false">
-              <c:choose>
-                <c:when test="${pageScope.project.state == 10 || pageScope.project.state == 2 || pageScope.project.state == 3 || pageScope.project.state == 4 || pageScope.project.state == 6}">
-                  <a href='<ww:url action="workingCopy">
+                    </ww:url>'><img src="<ww:url value='/images/buildhistory.gif'/>" alt="Build History"
+                                    title="Build History" border="0"></a>
+            </c:when>
+            <c:otherwise>
+              <img src="<ww:url value='/images/buildhistory_disabled.gif'/>" alt="Build History" title="Build History"
+                   border="0">
+            </c:otherwise>
+          </c:choose>
+        </ec:column>
+        <ec:column property="workingCopyAction" title="&nbsp;" width="1%" sortable="false">
+          <c:choose>
+            <c:when
+                test="${pageScope.project.state == 10 || pageScope.project.state == 2 || pageScope.project.state == 3 || pageScope.project.state == 4 || pageScope.project.state == 6}">
+              <a href='<ww:url action="workingCopy">
                       <ww:param name="projectId" value="${project.id}"/>
-                    </ww:url>'><img src="<ww:url value='/images/workingcopy.gif'/>" alt="Working Copy" title="Working Copy" border="0"></a>
-                </c:when>
-                <c:otherwise>
-                  <img src="<ww:url value='/images/workingcopy_disabled.gif'/>" alt="Working Copy" title="Working Copy" border="0">
-                </c:otherwise>
-              </c:choose>
-            </ec:column>
-          </ec:row>
-        </ec:table>
-        <div class="functnbar3">
-          <ww:form action="buildProject.action" method="post">
-            <ww:submit value="%{getText('summary.buildAll')}">
-              <ww:param name="before">
-                <img src="<ww:url value='/images/icon_success_sml.gif'/>" alt="<ww:text name='message.success'/>" title="<ww:text name='message.success'/>"/> <ww:property value="nbSuccesses"/>
-                <img src="<ww:url value='/images/icon_warning_sml.gif'/>" alt="<ww:text name='message.failed'/>" title="<ww:text name='message.failed'/>"/> <ww:property value="nbFailures"/>
-                <img src="<ww:url value='/images/icon_error_sml.gif'/>" alt="<ww:text name='message.error'/>" title="<ww:text name='message.error'/>"/> <ww:property value="nbErrors"/>
-              </ww:param>
-            </ww:submit>
-          </ww:form>
-        </div>
+                    </ww:url>'><img src="<ww:url value='/images/workingcopy.gif'/>" alt="Working Copy"
+                                    title="Working Copy" border="0"></a>
+            </c:when>
+            <c:otherwise>
+              <img src="<ww:url value='/images/workingcopy_disabled.gif'/>" alt="Working Copy" title="Working Copy"
+                   border="0">
+            </c:otherwise>
+          </c:choose>
+        </ec:column>
+      </ec:row>
+    </ec:table>
+    <c1:ifAuthorized permission="buildProject">
+      <div class="functnbar3">
+        <ww:form action="buildProject.action" method="post">
+          <ww:submit value="%{getText('summary.buildAll')}">
+            <ww:param name="before">
+              <img src="<ww:url value='/images/icon_success_sml.gif'/>" alt="<ww:text name='message.success'/>"
+                   title="<ww:text name='message.success'/>"/> <ww:property value="nbSuccesses"/>
+              <img src="<ww:url value='/images/icon_warning_sml.gif'/>" alt="<ww:text name='message.failed'/>"
+                   title="<ww:text name='message.failed'/>"/> <ww:property value="nbFailures"/>
+              <img src="<ww:url value='/images/icon_error_sml.gif'/>" alt="<ww:text name='message.error'/>"
+                   title="<ww:text name='message.error'/>"/> <ww:property value="nbErrors"/>
+            </ww:param>
+          </ww:submit>
+        </ww:form>
       </div>
-    </body>
-  </ww:i18n>
+    </c1:ifAuthorized>
+  </div>
+  </body>
+</ww:i18n>
 </html>

Added: maven/continuum/trunk/continuum-webapp/src/main/webapp/user.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/user.jsp?rev=434522&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/user.jsp (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/user.jsp Thu Aug 24 13:54:22 2006
@@ -0,0 +1,38 @@
+<%@ taglib uri="/webwork" prefix="ww" %>
+<%@ taglib uri="/tld/extremecomponents" prefix="ec" %>
+<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %>
+<html>
+<ww:i18n name="localization.Continuum">
+  <head>
+    <title>User</title>
+  </head>
+
+  <body>
+  <div id="axial" class="h3">
+
+    <div id="h3">
+      <h3><ww:text name="Users"/></h3>
+
+      <ww:form action="saveUser" method="post">
+
+        <div class="axial">
+          <table border="1" cellspacing="2" cellpadding="3" width="100%">
+            <ww:textfield label="Username" name="username"/>
+            <ww:textfield label="Full Name" name="fullName"/>
+            <ww:textfield label="Email" name="email"/>
+            <ww:textfield label="Password" name="password"/>
+            <ww:textfield label="Password(again)" name="passwordTwo"/>
+            <ww:select  list="userGroups" label="User Group" name="userGroupId"/>
+          </table>
+        </div>
+
+
+        <div class="functnbar3">
+          <c1:submitcancel value="%{getText('save')}" cancel="%{getText('cancel')}"/>
+        </div>
+
+      </ww:form>
+    </div>
+  </body>
+</ww:i18n>
+</html>

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/user.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroup.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroup.jsp?rev=434522&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroup.jsp (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroup.jsp Thu Aug 24 13:54:22 2006
@@ -0,0 +1,16 @@
+<%@ taglib uri="/webwork" prefix="ww" %>
+<html>
+<ww:i18n name="localization.Continuum">
+  <head>
+    <title>User Group Management</title>
+  </head>
+
+  <body>
+  <div id="axial" class="h3">
+    <h3>User Group Management</h3>
+
+    
+  </div>
+  </body>
+</ww:i18n>
+</html>

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroup.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroups.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroups.jsp?rev=434522&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroups.jsp (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroups.jsp Thu Aug 24 13:54:22 2006
@@ -0,0 +1,16 @@
+<%@ taglib uri="/webwork" prefix="ww" %>
+<html>
+<ww:i18n name="localization.Continuum">
+  <head>
+    <title>User Group Management</title>
+  </head>
+
+  <body>
+  <div id="axial" class="h3">
+    <h3>User Group Management</h3>
+
+    
+  </div>
+  </body>
+</ww:i18n>
+</html>

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroups.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/continuum/trunk/continuum-webapp/src/main/webapp/users.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/users.jsp?rev=434522&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/users.jsp (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/users.jsp Thu Aug 24 13:54:22 2006
@@ -0,0 +1,49 @@
+<%@ taglib uri="/webwork" prefix="ww" %>
+<%@ taglib uri="/tld/extremecomponents" prefix="ec" %>
+<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
+<%@ taglib uri="continuum" prefix="c1" %>
+<html>
+<ww:i18n name="localization.Continuum">
+  <head>
+    <title>User Management</title>
+  </head>
+
+  <body>
+  <div id="axial" class="h3">
+
+     <div id="h3">
+        <h3><ww:text name="Users"/></h3>
+
+        <ec:table items="users"
+                  var="user"
+                  showExports="false"
+                  showPagination="false"
+                  showStatusBar="false"
+                  filterable="false">
+         <ec:row>
+            <ec:column property="username" title="Name"/>
+            <ec:column property="fullName" title="Full Name"/>
+            <ec:column property="email" title="Email"/>
+            <ec:column property="userGroupId" title="Group"/>
+            <ec:column property="actions" title="&nbsp;">
+                <ww:url id="editUrl" action="user" method="input">
+                  <ww:param name="userId" value="${pageScope.user.accountId}"/>
+                </ww:url>
+                <ww:a href="%{editUrl}">Edit</ww:a>
+                &nbsp;
+
+                <ww:text name="delete"/>
+            </ec:column>
+          </ec:row>
+        </ec:table>
+      </div>
+      <div class="functnbar3">
+        <ww:form action="user" method="post">
+          <ww:submit value="%{getText('add')}"/>
+        </ww:form>
+    </div>
+
+  </div>
+  </body>
+</ww:i18n>
+</html>

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/users.jsp
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message