continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r440904 - in /maven/continuum/branches/continuum-acegi/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ProjectGroupPermissionsAction.java resources/xwork.xml webapp/projectGroupPermissions.jsp
Date Wed, 06 Sep 2006 23:42:35 GMT
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 <a href="mailto:hisidro@exist.com">Henry Isidro</a>
+ *
+ * @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 @@
       <result name="input">projectEdit.jsp</result>
       <result name="success" type="chain">projectView</result>
     </action>
+    
+    <action name="projectGroupPermissions" class="projectGroupPermissions">
+      <result name="input">projectGroupPermissions.jsp</result>
+    </action>
 
     <!--
     * build definition actions

Added: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupPermissions.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupPermissions.jsp?view=auto&rev=440904
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupPermissions.jsp
(added)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupPermissions.jsp
Wed Sep  6 16:42:34 2006
@@ -0,0 +1,65 @@
+<%@ taglib uri="/webwork" prefix="ww" %>
+<%@ taglib uri="http://www.extremecomponents.org" 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><ww:text name="projectView.page.title"/></title>
+    </head>
+
+    <body>
+      <div id="h3">
+
+        <jsp:include page="/navigations/ProjectGroupMenu.jsp">
+          <jsp:param name="tab" value="summary"/>
+        </jsp:include>
+
+        <h3>Project Group Information</h3>
+            
+        <div class="axial">
+          <table border="1" cellspacing="2" cellpadding="3" width="100%">
+            <c1:data label="%{getText('projectView.project.name')}" name="projectGroup.name"/>
+            <c1:data label="Group Id" name="projectGroup.groupId"/>
+            <c1:data label="Description" name="projectGroup.description"/>
+           </table>
+        </div>
+
+        <h3>Users</h3>
+
+        <ec:table items="users"
+                  var="user"
+                  showExports="false"
+                  showPagination="false"
+                  showStatusBar="false"
+                  filterable="false">
+          <ec:row highlightRow="true">
+            <ec:column property="username" title="User Name" width="48%">
+            </ec:column>
+            <ec:column property="view" title="View" width="1%" sortable="false">
+              <center>
+                <ww:checkbox label="" name="viewPermission" value="${pageScope.user.view}"
fieldValue="true"/>
+              </center>
+            </ec:column>
+            <ec:column property="edit" title="Edit" width="1%" sortable="false">
+              <center>
+                <ww:checkbox label="" name="editPermission" value="${pageScope.user.edit}"
fieldValue="true"/>
+              </center>
+            </ec:column>
+            <ec:column property="delete" title="Delete" width="1%" sortable="false">
+              <center>
+                <ww:checkbox label="" name="deletePermission" value="${pageScope.user.delete}"
fieldValue="true"/>
+              </center>
+            </ec:column>
+            <ec:column property="build" title="Build" width="1%" sortable="false">
+              <center>
+                <ww:checkbox label="" name="buildPermission" value="${pageScope.user.build}"
fieldValue="true"/>
+              </center>
+            </ec:column>
+          </ec:row>
+        </ec:table>
+
+    </body> 
+  </ww:i18n>
+</html>

Propchange: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupPermissions.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/projectGroupPermissions.jsp
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message