Author: carlos Date: Wed Sep 6 16:42:34 2006 New Revision: 440904 URL: http://svn.apache.org/viewvc?view=rev&rev=440904 Log: Add project group permissions functionality Added: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java (with props) maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupPermissions.jsp (with props) Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml Added: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java?view=auto&rev=440904 ============================================================================== --- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java (added) +++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java Wed Sep 6 16:42:34 2006 @@ -0,0 +1,87 @@ +package org.apache.maven.continuum.web.action; + +/* + * Copyright 2005-2006 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. + */ + +import org.apache.maven.continuum.model.project.Project; +import org.apache.maven.continuum.ContinuumException; + +import org.apache.maven.user.model.UserManager; + +import java.util.List; +import java.util.Map; +import java.util.Iterator; + +/** + * Action to see and edit project group permissions per user. + * + * @author Henry Isidro + * + * @plexus.component + * role="com.opensymphony.xwork.Action" + * role-hint="projectGroupPermissions" + */ +public class ProjectGroupPermissionsAction + extends ContinuumActionSupport +{ + /** + * @plexus.requirement + */ + private UserManager userManager; + + private Project project; + + private int projectId; + + private Map users; + + public String execute() + throws ContinuumException + { + users = userManager.getUsersInstancePermissions(); + + project = getProject( projectId ); + + return INPUT; + } + + public String save() + throws ContinuumException + { + return SUCCESS; + } + + private Project getProject( int projectId ) + throws ContinuumException + { + return getContinuum().getProject( projectId ); + } + + public int getProjectId() + { + return projectId; + } + + public void setProjectId( int projectId ) + { + this.projectId = projectId; + } + + public Map getUsers() + { + return users; + } +} Propchange: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml?view=diff&rev=440904&r1=440903&r2=440904 ============================================================================== --- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml (original) +++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/xwork.xml Wed Sep 6 16:42:34 2006 @@ -94,6 +94,10 @@ projectEdit.jsp projectView + + + projectGroupPermissions.jsp +