continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r699068 - in /continuum/trunk: ./ continuum-docs/src/site/xdoc/ continuum-purge/ continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Date Thu, 25 Sep 2008 19:57:57 GMT
Author: olamy
Date: Thu Sep 25 12:57:56 2008
New Revision: 699068

URL: http://svn.apache.org/viewvc?rev=699068&view=rev
Log:
merge -r698816:698819 from 1.2.x branch
fix [CONTINUUM-1889]


Modified:
    continuum/trunk/   (props changed)
    continuum/trunk/continuum-docs/src/site/xdoc/   (props changed)
    continuum/trunk/continuum-purge/   (props changed)
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java

Propchange: continuum/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 25 12:57:56 2008
@@ -1 +1 @@
-/continuum/branches/continuum-1.2.x:690684,690689-690799,698449-698533
+/continuum/branches/continuum-1.2.x:690684,690689-690799,698449-698533,698817-698819

Propchange: continuum/trunk/continuum-docs/src/site/xdoc/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 25 12:57:56 2008
@@ -1,2 +1,2 @@
-/continuum/branches/continuum-1.2.x/continuum-docs/src/site/xdoc:698449-698533
+/continuum/branches/continuum-1.2.x/continuum-docs/src/site/xdoc:698449-698533,698817-698819
 /continuum/trunk/continuum-docs/src/site/xdoc:690494-690520

Propchange: continuum/trunk/continuum-purge/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Sep 25 12:57:56 2008
@@ -1,4 +1,5 @@
 .classpath
 .settings
 .project
+continuum-purge.iml
 target

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=699068&r1=699067&r2=699068&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Thu Sep 25 12:57:56 2008
@@ -28,7 +28,6 @@
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.web.bean.ProjectGroupUserBean;
-import org.apache.maven.continuum.web.exception.AuthenticationRequiredException;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
 import org.codehaus.plexus.redback.rbac.RBACManager;
 import org.codehaus.plexus.redback.rbac.RbacManagerException;
@@ -346,7 +345,10 @@
         while ( proj_group.hasNext() )
         {
             ProjectGroup pg = (ProjectGroup) proj_group.next();
-            projectGroups.put( new Integer( pg.getId() ), pg.getName() );
+            if ( isAuthorized( projectGroup.getName() ) )
+            {
+                projectGroups.put( new Integer( pg.getId() ), pg.getName() );
+            }
         }
 
         if ( projectGroup.getLocalRepository() != null )
@@ -973,4 +975,17 @@
     {
         this.disabledRepositories = disabledRepositories;
     }
+
+    private boolean isAuthorized( String projectGroupName )
+    {
+        try
+        {
+            checkAddProjectToGroupAuthorization( projectGroupName );
+            return true;
+        }
+        catch ( AuthorizationRequiredException authzE )
+        {
+            return false;
+        }
+    }
 }



Mime
View raw message