continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r574916 - /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
Date Wed, 12 Sep 2007 12:33:07 GMT
Author: evenisse
Date: Wed Sep 12 05:33:06 2007
New Revision: 574916

URL: http://svn.apache.org/viewvc?rev=574916&view=rev
Log:
[CONTINUMM-1395] Fix "Add Ant/Shell project" for users that don't have admin rights

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java?rev=574916&r1=574915&r2=574916&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
Wed Sep 12 05:33:06 2007
@@ -75,7 +75,7 @@
      * @plexus.requirement role-hint="default"
      */
     private ProfileService profileService;
-    
+
     private int projectGroupId;
 
     public void validate()
@@ -112,6 +112,8 @@
     public String add()
         throws ContinuumException
     {
+        initializeProjectGroupName();
+
         try
         {
             if ( StringUtils.isEmpty( getProjectGroupName() ) )
@@ -151,8 +153,8 @@
         {
             this.setProjectGroupId( this.getSelectedProjectGroup() );
             return "projectGroupSummary";
-        }        
-        
+        }
+
         return SUCCESS;
     }
 
@@ -195,6 +197,21 @@
         }
         this.profiles = profileService.getAllProfiles();
         return SUCCESS;
+    }
+
+    private void initializeProjectGroupName()
+    {
+        if ( disableGroupSelection == true )
+        {
+            try
+            {
+                projectGroupName = getContinuum().getProjectGroup( selectedProjectGroup ).getName();
+            }
+            catch ( ContinuumException e )
+            {
+                e.printStackTrace();
+            }
+        }
     }
 
     public String getProjectName()



Mime
View raw message