[jboss-svn-commits] JBL Code SVN: r5316 - in labs/jbossforums/trunk: . authz-jaae-plugin authz-jaae-plugin/src authz-jaae-plugin/src/main authz-jaae-plugin/src/main/org authz-jaae-plugin/src/main/org/jboss authz-jaae-plugin/src/main/org/jboss/forums authz-jaae-plugin/src/main/org/jboss/forums/security authz-jaae-plugin/src/resources authz-jaae-plugin/src/resources/forums-authz-plugin.sar authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF build forums/src/resources/portal-forums-war/WEB-INF thirdparty thirdparty/jakarta-commons-jexl thirdparty/jakarta-commons-jexl/lib thirdparty/jboss-jaae-engine thirdparty/jboss-jaae-engine/lib tools/etc/buildfragments

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jul 27 13:18:23 EDT 2006


Author: sohil.shah at jboss.com
Date: 2006-07-27 13:18:21 -0400 (Thu, 27 Jul 2006)
New Revision: 5316

Added:
   labs/jbossforums/trunk/authz-jaae-plugin/
   labs/jbossforums/trunk/authz-jaae-plugin/build.bat
   labs/jbossforums/trunk/authz-jaae-plugin/build.log
   labs/jbossforums/trunk/authz-jaae-plugin/build.sh
   labs/jbossforums/trunk/authz-jaae-plugin/build.xml
   labs/jbossforums/trunk/authz-jaae-plugin/src/
   labs/jbossforums/trunk/authz-jaae-plugin/src/main/
   labs/jbossforums/trunk/authz-jaae-plugin/src/main/org/
   labs/jbossforums/trunk/authz-jaae-plugin/src/main/org/jboss/
   labs/jbossforums/trunk/authz-jaae-plugin/src/main/org/jboss/forums/
   labs/jbossforums/trunk/authz-jaae-plugin/src/main/org/jboss/forums/security/
   labs/jbossforums/trunk/authz-jaae-plugin/src/main/org/jboss/forums/security/AuthorizationProvider.java
   labs/jbossforums/trunk/authz-jaae-plugin/src/main/org/jboss/forums/security/JBossPortalUtil.java
   labs/jbossforums/trunk/authz-jaae-plugin/src/resources/
   labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/
   labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/
   labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-mapping.xml
   labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml
   labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/jboss-service.xml
   labs/jbossforums/trunk/thirdparty/jakarta-commons-jexl/
   labs/jbossforums/trunk/thirdparty/jakarta-commons-jexl/lib/
   labs/jbossforums/trunk/thirdparty/jakarta-commons-jexl/lib/commons-jexl-1.0.jar
   labs/jbossforums/trunk/thirdparty/jboss-jaae-engine/
   labs/jbossforums/trunk/thirdparty/jboss-jaae-engine/lib/
   labs/jbossforums/trunk/thirdparty/jboss-jaae-engine/lib/jboss-acl.jar
   labs/jbossforums/trunk/thirdparty/jboss-jaae-engine/lib/jboss-identity-management.jar
   labs/jbossforums/trunk/thirdparty/jboss-jaae-engine/lib/jboss-security-common.jar
Modified:
   labs/jbossforums/trunk/build/build.xml
   labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml
   labs/jbossforums/trunk/tools/etc/buildfragments/libraries.ent
   labs/jbossforums/trunk/tools/etc/buildfragments/modules.ent
Log:
The Authorization Plugin component. This is a pluggable component used for Access Control.

Added: labs/jbossforums/trunk/authz-jaae-plugin/build.bat
===================================================================
--- labs/jbossforums/trunk/authz-jaae-plugin/build.bat	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/authz-jaae-plugin/build.bat	2006-07-27 17:18:21 UTC (rev 5316)
@@ -0,0 +1,54 @@
+ at echo off
+rem
+rem  Invokes a script of the same name in the 'tools' module.
+rem  
+rem  The 'tools' module is expected to be a peer directory of the directory
+rem  in which this script lives.
+rem
+rem  @author Jason Dillon <jason at planet57.com>
+rem
+
+rem $Id: build.bat,v 1.1.1.1 2005/01/14 23:12:37 vietj Exp $
+
+setlocal
+
+set PROGNAME=%~nx0
+set DIRNAME=%~dp0
+
+rem Legacy shell support
+if x%PROGNAME%==x set PROGNAME=build.bat
+if x%DIRNAME%==x set DIRNAME=.\
+
+set MODULE_ROOT=%DIRNAME%
+if x%TOOLS_ROOT%==x set TOOLS_ROOT=%DIRNAME%..\tools
+set TARGET=%TOOLS_ROOT%\bin\build.bat
+set ARGS=%*
+
+rem Start'er up yo
+goto main
+
+:debug
+if not x%DEBUG%==x echo %PROGNAME%: %*
+goto :EOF
+
+:main
+call :debug PROGNAME=%PROGNAME%
+call :debug DIRNAME=%DIRNAME%
+call :debug TOOLS_ROOT=%TOOLS_ROOT%
+call :debug TARGET=%TARGET%
+
+if exist %TARGET% call :call-script & goto :EOF
+rem else fail, we can not go on
+
+echo %PROGNAME%: *ERROR* The target executable does not exist:
+echo %PROGNAME%:
+echo %PROGNAME%:    %TARGET%
+echo %PROGNAME%:
+echo %PROGNAME%: Please make sure you have checked out the 'tools' module
+echo %PROGNAME%: and make sure it is up to date.
+goto :EOF
+
+:call-script
+call :debug Executing %TARGET% %ARGS%
+call %TARGET% %ARGS%
+goto :EOF

Added: labs/jbossforums/trunk/authz-jaae-plugin/build.log
===================================================================
--- labs/jbossforums/trunk/authz-jaae-plugin/build.log	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/authz-jaae-plugin/build.log	2006-07-27 17:18:21 UTC (rev 5316)
@@ -0,0 +1,36 @@
+
+configure:
+
+configure-libraries:
+
+configure-modules:
+
+configure-defaults:
+
+configure-tools:
+
+_configure:explode:task:
+
+_configure:xdoclet:task:
+
+_configure:xdoclet:ejbdoclet:
+
+_configure:xdoclet:jmxdoclet:
+
+_configure:xdoclet:hibernatedoclet:
+
+_configure:xdoclet:webdoclet:
+
+_configure:cactus:cactus:
+     [echo] C:\projects\core-portal\jbossforums/thirdparty/junit-junit/lib
+
+init:
+
+_buildmagic:clean:
+   [delete] Deleting directory C:\projects\core-portal\jbossforums\authz-jaae-plugin\output
+
+_default:clean:
+
+clean:
+
+BUILD SUCCESSFUL

Added: labs/jbossforums/trunk/authz-jaae-plugin/build.sh
===================================================================
--- labs/jbossforums/trunk/authz-jaae-plugin/build.sh	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/authz-jaae-plugin/build.sh	2006-07-27 17:18:21 UTC (rev 5316)
@@ -0,0 +1,49 @@
+#!/bin/sh
+##
+##  Invokes a script of the same name in the 'tools' module.
+##  
+##  The 'tools' module is expected to be a peer directory of the directory
+##  in which this script lives.
+##
+##  @author Jason Dillon <jason at planet57.com>
+##
+
+# $Id: build.sh,v 1.1.1.1 2005/01/14 23:12:37 vietj Exp $
+
+PROGNAME=`basename $0`
+DIRNAME=`dirname $0`
+
+# Buss it yo
+main() {
+    if [ "x$TOOLS_ROOT" = "x" ]; then
+	TOOLS_ROOT=`cd $DIRNAME/../tools && pwd`
+    fi
+
+    MODULE_ROOT=`cd $DIRNAME; pwd`
+    export TOOLS_ROOT MODULE_ROOT DEBUG TRACE
+
+    # Where is the target script?
+    target="$TOOLS_ROOT/bin/$PROGNAME"
+    if [ ! -f "$target" ]; then
+	echo "${PROGNAME}: *ERROR* The target executable does not exist:"
+        echo "${PROGNAME}:"
+        echo "${PROGNAME}:    $target"
+        echo "${PROGNAME}:"
+	echo "${PROGNAME}: Please make sure you have checked out the 'tools' module"
+	echo "${PROGNAME}: and make sure it is up to date."
+        exit 2
+    fi
+
+    # Get busy yo!
+    if [ "x$DEBUG" != "x" ]; then
+	echo "${PROGNAME}: Executing: /bin/sh $target $@"
+    fi
+    if [ "x$TRACE" = "x" ]; then
+	exec /bin/sh $target "$@"
+    else
+	exec /bin/sh -x $target "$@"
+    fi
+}
+
+# Lets get ready to rumble!
+main "$@"

Added: labs/jbossforums/trunk/authz-jaae-plugin/build.xml
===================================================================
--- labs/jbossforums/trunk/authz-jaae-plugin/build.xml	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/authz-jaae-plugin/build.xml	2006-07-27 17:18:21 UTC (rev 5316)
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+   <!ENTITY buildmagic SYSTEM "../tools/etc/buildfragments/buildmagic.ent">
+   <!ENTITY tools      SYSTEM "../tools/etc/buildfragments/tools.ent">
+   <!ENTITY libraries  SYSTEM "../tools/etc/buildfragments/libraries.ent">
+   <!ENTITY modules    SYSTEM "../tools/etc/buildfragments/modules.ent">
+   <!ENTITY defaults   SYSTEM "../tools/etc/buildfragments/defaults.ent">
+   <!ENTITY targets    SYSTEM "../tools/etc/buildfragments/targets.ent">
+   ]>
+
+<!-- $Id: build.xml,v 1.13 2005/11/05 15:02:50 bdaw Exp $ -->
+
+<!--+======================================================================+-->
+<!--| JBoss Portal (The OpenSource Portal) Build File                      |-->
+<!--|                                                                      |-->
+<!--| Distributable under LGPL license.                                    |-->
+<!--| See terms of license at http://www.gnu.org.                          |-->
+<!--|                                                                      |-->
+<!--| This file has been designed to work with the 'tools' module and      |-->
+<!--| Buildmagic extentions.                                               |-->
+<!--+======================================================================+-->
+
+<project default="main" name="Forums Authorization Plugin based on JAAE">
+
+	<!--+====================================================================+-->
+   <!--| Setup                                                              |-->
+   <!--|                                                                    |-->
+   <!--| Include the common build elements.                                 |-->
+   <!--|                                                                    |-->
+   <!--| This defines several different targets, properties and paths.      |-->
+   <!--| It also sets up the basic extention tasks amoung other things.     |-->
+   <!--+====================================================================+-->
+
+   &buildmagic;
+   &libraries;
+   &modules;
+   &defaults;
+   &tools;
+   &targets;
+
+   <!-- ================================================================== -->
+   <!-- Initialization                                                     -->
+   <!-- ================================================================== -->
+
+   <!--
+     | Initialize the build system.  Must depend on '_buildmagic:init'.
+     | Other targets should depend on 'init' or things will mysteriously fail.
+   -->
+
+   <target name="init" unless="init.disable" depends="_buildmagic:init">
+   </target>
+
+   <!--+====================================================================+-->
+   <!--| Configuration                                                      |-->
+   <!--|                                                                    |-->
+   <!--| This target is invoked by the Buildmagic initialization logic      |-->
+   <!--| and should contain module specific configuration elements.         |-->
+   <!--+====================================================================+-->
+
+   <target name="configure" unless="configure.disable">
+
+	  <!-- Configure some properties -->
+      <property name="jndi-root" value="portal"/>
+
+      <!-- Configure thirdparty libraries -->
+      <call target="configure-libraries"/>
+		<path id="library.classpath">
+			<path refid="apache.myfaces.classpath"/>			
+			<path refid="jbportal.classpath"/>				        
+			<path refid="jboss-jaae-engine.classpath"/>
+			<path refid="jakarta-commons-jexl.classpath"/>						
+		</path>
+
+      <!-- Configure modules -->
+      <call target="configure-modules"/>
+	
+	    <!-- removing all src level dependency on portal....helps with building
+	    the forum application that upgrades easier across portal releases -->
+		<path id="dependentmodule.classpath">
+			<path refid="forums.classpath"/>
+			<!--path refid="jboss.portal-format.classpath"/>
+			<path refid="jboss.portal-common.classpath"/>
+			<path refid="jboss.portal-portlet.classpath"/>
+			<path refid="jboss.portal-server.classpath"/>
+			<path refid="jboss.portlet-api.classpath"/>
+			<path refid="jboss.hibernate.classpath"/-->
+		</path>
+
+      <!--+=======================================+-->
+      <!--| Override any default properties here. |-->
+      <!--+=======================================+-->
+
+      <!-- Configure defaults & build tools -->
+      <call target="configure-defaults"/>
+		<call target="configure-tools"/>
+
+      <!--+=======================================+-->
+      <!--| Define module specific elements here. |-->
+      <!--+=======================================+-->
+      <property name="javadoc.private" value="true"/>
+		<property name="javadoc.protected" value="false"/>
+
+	</target>
+
+
+   <!--+====================================================================+-->
+   <!--| Compile                                                            |-->
+   <!--|                                                                    |-->
+   <!--| This target should depend on other compile-* targets for each      |-->
+   <!--| different type of compile that needs to be performed, short of     |-->
+   <!--| documentation compiles.                                            |-->
+   <!--+====================================================================+-->
+
+   <target name="compile" description="Compile all source files." depends="generate-classes,
+               _default:compile-classes,
+               _default:compile-etc,
+               _default:compile-resources">		
+	</target>
+
+   <!-- Generate all class files -->
+   <target name="generate-classes" depends="init">
+	</target>
+
+   <!-- Remove or change the delimiter in hibernate-export if your database has a different deliniter -->
+   <target name="ddl" depends="output">		
+	</target>
+
+   <!--+====================================================================+-->
+   <!--| Generate Output                                                    |-->
+   <!--|                                                                    |-->
+   <!--| Generates the target output for this module. Target output is      |-->
+   <!--| the output which is ment to be released or used by external        |-->
+   <!--| modules.                                                           |-->
+   <!--+====================================================================+-->
+
+   <target name="output" description="Generate all target output." depends="compile">
+
+	  <mkdir dir="${build.lib}"/>
+
+      <!-- forums-authz-plugin.jar -->
+      <jar jarfile="${build.lib}/forums-authz-plugin.jar">
+			<fileset dir="${build.classes}"/>
+	  </jar>
+
+      <!-- forums-authz-plugin.sar -->
+      <jar jarfile="${build.lib}/portal-forums-authz-plugin.sar">
+		<!-- forums-authz-plugin.jar -->
+		<fileset dir="${build.lib}" includes="*.jar"/>
+		<!-- include jbportal libs -->
+		<fileset dir="${jbportal.lib}" includes="portal-core-lib.jar"/>
+		<fileset dir="${jbportal.lib}" includes="portal-forums-lib.jar"/>
+		<!-- include the forums-ui.jar -->
+		<fileset dir="${forums.lib}" includes="*.jar"/>
+		<!-- include jexl libs -->
+		<fileset dir="${jakarta-commons-jexl.lib}" includes="*.jar"/>
+		<!-- include jaae libs -->
+		<fileset dir="${jboss-jaae-engine.lib}" includes="*.jar"/>
+		<!-- sar configuration files -->
+		<fileset dir="${build.resources}/forums-authz-plugin.sar"/>
+      </jar>      
+	</target>
+
+	<target name="explode" depends="init">
+		<explode file="${build.lib}/portal-forums-authz-plugin.sar" todir="${build.lib}" name="portal-forums-authz-plugin-exploded.sar"/>
+	</target>
+
+   <!-- ================================================================== -->
+   <!-- Cleaning                                                           -->
+   <!-- ================================================================== -->
+
+   <!-- Clean up all build output -->
+   <target name="clean" depends="_default:clean">
+		<!-- Add module specific elements here. -->
+	</target>
+
+   <!--+====================================================================+-->
+   <!--| Documents                                                          |-->
+   <!--|                                                                    |-->
+   <!--| Generate all documentation for this module.                        |-->
+   <!--+====================================================================+-->
+
+   <target name="docs" depends="_default:docs">
+		<!-- Add module specific elements here. -->
+	</target>
+
+   <!-- ================================================================== -->
+   <!-- Misc.                                                              -->
+   <!-- ================================================================== -->
+
+   <target name="main" depends="most"/>
+	<target name="all" depends="_default:all"/>
+	<target name="most" depends="_default:most"/>
+	<target name="help" depends="_default:help"/>
+
+   <!-- ================================================================== -->
+   <!-- Deployment                                                         -->
+   <!-- ================================================================== -->
+
+   <!--
+     | Deploy the application
+   -->
+   <target name="deploy" description="Deploy." depends="output">
+		<require file="${jboss.home}/server/${portal.deploy.dir}/deploy"/>
+		<copy file="${build.lib}/portal-forums-authz-plugin.sar" todir="${jboss.home}/server/${portal.deploy.dir}/deploy"/>	    
+	</target>
+
+   <!--
+     | Undeploy the application
+   -->
+   <target name="undeploy" description="Undeploy." depends="init">
+		<require file="${jboss.home}/server/${portal.deploy.dir}/deploy"/>
+		<delete file="${jboss.home}/server/${portal.deploy.dir}/deploy/portal-forums-authz-plugin.sar"/>		
+	</target>
+
+	<target name="test" depends="init">
+	</target>
+</project>

Added: labs/jbossforums/trunk/authz-jaae-plugin/src/main/org/jboss/forums/security/AuthorizationProvider.java
===================================================================
--- labs/jbossforums/trunk/authz-jaae-plugin/src/main/org/jboss/forums/security/AuthorizationProvider.java	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/authz-jaae-plugin/src/main/org/jboss/forums/security/AuthorizationProvider.java	2006-07-27 17:18:21 UTC (rev 5316)
@@ -0,0 +1,99 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.forums.security;
+
+
+//portal forums related
+import org.jboss.portlet.forums.auth.AuthorizationInterface;
+import org.jboss.portlet.forums.auth.SecurityContext;
+import org.jboss.portlet.forums.auth.JSFActionContext;
+import org.jboss.portlet.forums.auth.JSFUIContext;
+
+//jboss-acl-engine
+import org.jboss.security.acl.AclProcessor;
+import org.jboss.security.acl.AccessDenied;
+import org.jboss.security.acl.User;
+import org.jboss.security.acl.UserThreadLocal;
+
+/*
+ * Created on May 18, 2006
+ *
+ * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
+ */
+public class AuthorizationProvider implements AuthorizationInterface
+{
+    /**
+     * 
+     */
+    public AuthorizationProvider()
+    {        
+    }
+    
+    /**
+     * 
+     *
+     */
+    public boolean hasAccess(SecurityContext context)
+    {
+        boolean hasAccess = true;     
+        try
+        {
+	        //setup the engine identity based on identity provided in the security context
+            if(context.getIdentity()!=null)
+            {
+                User user = User.getUser(((org.jboss.portal.core.model.User)context.getIdentity()).getUserName());
+                JBossPortalUtil.populateRoles(user);
+                UserThreadLocal.setUser(user);
+            }
+	        
+	        if(context instanceof JSFActionContext)
+	        {
+	            JSFActionContext securityContext = (JSFActionContext)context;
+	            
+		        //send this to the engine for access control decision
+		        AclProcessor.getInstance().processJSFActionAccess(
+		        securityContext.getFacesContext(),
+		        securityContext.getManagedBean(),
+		        securityContext.getBusinessAction());
+	        }
+	        else if(context instanceof JSFUIContext)
+	        {
+	            JSFUIContext securityContext = (JSFUIContext)context;
+	            
+		        //send this to the engine for access control decision
+		        AclProcessor.getInstance().processFragmentAccess(securityContext.getFragment(),securityContext.getContextData());		        
+	        }
+        }
+        catch(AccessDenied ade)
+        {
+            hasAccess = false;
+        }
+        catch(Exception e)
+        {
+            throw new RuntimeException(e);
+        }
+        
+        return hasAccess;
+    }
+    
+    
+}

Added: labs/jbossforums/trunk/authz-jaae-plugin/src/main/org/jboss/forums/security/JBossPortalUtil.java
===================================================================
--- labs/jbossforums/trunk/authz-jaae-plugin/src/main/org/jboss/forums/security/JBossPortalUtil.java	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/authz-jaae-plugin/src/main/org/jboss/forums/security/JBossPortalUtil.java	2006-07-27 17:18:21 UTC (rev 5316)
@@ -0,0 +1,99 @@
+package org.jboss.forums.security;
+
+//core java
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.naming.InitialContext;
+
+
+//website security
+import org.jboss.security.util.Util;
+
+//jboss-acl framework
+import org.jboss.security.acl.Role;
+import org.jboss.security.acl.User;
+
+/**
+ * TODO: (migration marker)
+ *       (jbportal2.0 - jbportal2.2.1rc1) - done
+ */
+import org.jboss.portal.core.modules.RoleModule;
+import org.jboss.portal.core.modules.UserModule;
+
+
+/**
+ * 
+ * @author Sohil Shah - sohil.shah at jboss.com
+ *
+ */
+public class JBossPortalUtil 
+{
+    private static final String ROLE_MODULE_JNDI_NAME = "java:portal/RoleModule";
+    private static final String USER_MODULE_JNDI_NAME = "java:portal/UserModule";
+    
+        
+    
+    /**
+     * 
+     * @return
+     * @throws Exception
+     */
+    public static RoleModule getRoleModule() throws Exception
+    {
+        RoleModule roleModule = null;
+        
+        //get the role module from the portal
+        InitialContext ctx = new InitialContext();
+        roleModule = (RoleModule)ctx.lookup(JBossPortalUtil.ROLE_MODULE_JNDI_NAME);
+        
+        
+        return roleModule;
+    }
+    
+    /**
+     * 
+     * @return
+     * @throws Exception
+     */
+    public static UserModule getUserModule() throws Exception
+    {
+        UserModule userModule = null;
+        
+        //get the user module from the portal 
+        InitialContext ctx = new InitialContext();
+        userModule = (UserModule)ctx.lookup(JBossPortalUtil.USER_MODULE_JNDI_NAME);
+        
+        return userModule;
+    }
+        
+    /**
+     * 
+     * @param user
+     * @throws Exception
+     */
+    public static void populateRoles(User user) throws Exception
+    {        
+        InitialContext context = new InitialContext();
+                
+        //perform this operation in the context of a JTA Transaction
+        if(user!=null && user.getIdentity()!=null)
+        {            
+            UserModule userModule = JBossPortalUtil.getUserModule();
+            
+            //grab the roles for this user
+            String username = user.getIdentity().getUserName();            
+            org.jboss.portal.core.model.User portalUser = userModule.findUserByUserName(username);
+            Set roles = portalUser.getRoleNames();
+            if(!Util.isEmpty(roles))
+            {
+                for(Iterator itr=roles.iterator();itr.hasNext();)
+                {
+                    String roleName = (String)itr.next();
+                    Role role = new Role(roleName,roleName);
+                    user.getRoles().add(role);
+                }
+            }
+        }                
+    }
+}

Added: labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-mapping.xml
===================================================================
--- labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-mapping.xml	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-mapping.xml	2006-07-27 17:18:21 UTC (rev 5316)
@@ -0,0 +1,320 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!--  make sure all class values are fully qualified names of concrete classes. Interfaces are not supported at this point -->
+<!--  think of the extra-info tag in the permission tag as parameters to the custom Enforcer, Default Enforcer ignores these, extra-info tags are not required -->
+<!--  some rules regarding the relationships between the various concepts. These are subject to change as this framework evolves -->
+
+<!--
+	the functionId - id attribute within the function tag should be unique across the system
+	
+	A resource can be associated with multiple functions, but a resource cannot be associated with multiple modules
+	
+	Module defines the overall component that needs protection within the system, Function defines various protected functions within a Module, and
+	Resources are system level objects (java methods, user interface fragments etc) that need to be accessed to successfully perform a function 
+	within a module 
+			
+	An Enforcer is the object that actually performs the access control logic. The framework comes bundled with a DefaultEnforcer which should take care of 90% 
+    of ACL cases for an application. Applications can plug-in their own Enforcer that can perform this logic based on the runtime values, extra-parameter
+    values etc. Having the Enforcer perform the access control logic keeps any ACL checking code to be hard coded within the business logic of the
+    application. This leads to better flexibility from a security perspective of the system 
+    
+    List of system resources supported:
+    1) Java Class Methods - type=method
+    2) UI Fragments within a Page - type=fragment
+    
+    List of resource extensions:
+    3) JSF ManagedBean action - type=jsfAction
+ -->
+
+<acl>
+	<!-- Forums Admin Tool usecases  -->
+	<module id="adminTool" name="AdminTool">						
+		<function id="accessAdminTool" name="Access Admin Tool">
+			<!-- ui protection -->
+			<resource type="fragment">
+				<id>acl://accessAdminTool</id>
+			</resource>
+		</function>
+	
+		<function id="viewCategory" name="View Category">
+			<!-- ui protection -->
+			<resource type="fragment" criteriaId="viewCategory://ui">
+				<id>acl://viewCategory</id>
+			</resource>
+		</function>
+		
+		<function id="addCategory" name="Add Category">
+			<!-- ui protection -->
+			<resource type="fragment">				
+				<id>acl://addCategory</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.AdminController</class>
+				<method>addCategory</method>				
+			</resource>
+			<implies>accessAdminTool</implies>
+			<implies>viewCategory</implies>
+		</function>
+		
+		<function id="editCategory" name="Edit Category">			
+			<!-- ui protection -->
+			<resource type="fragment">				
+				<id>acl://editCategory</id>
+			</resource>	
+			<!-- action protection -->
+			<resource type="jsfAction" criteriaId="editCategory://action">				
+				<class>org.jboss.portlet.forums.ui.action.AdminController</class>
+				<method>editCategory</method>				
+			</resource>
+			<implies>accessAdminTool</implies>
+			<implies>viewCategory</implies>
+			<implies>addCategory</implies>			
+		</function>
+			
+		<function id="deleteCategory" name="Delete Category">
+			<!-- ui protection -->
+			<resource type="fragment">				
+				<id>acl://deleteCategory</id>
+			</resource>
+			<!-- action protection -->			
+			<resource type="jsfAction" criteriaId="deleteCategory://action">				
+				<class>org.jboss.portlet.forums.ui.action.AdminController</class>
+				<method>deleteCategory</method>				
+			</resource>
+			<implies>accessAdminTool</implies>
+			<implies>viewCategory</implies>
+			<implies>addCategory</implies>
+			<implies>editCategory</implies>
+		</function>
+		
+		<function id="viewForum" name="View Forum">
+			<!-- ui protection -->
+			<resource type="fragment" criteriaId="viewForum://ui">
+				<id>acl://viewForum</id>
+			</resource>
+			<implies>accessAdminTool</implies>
+			<implies>viewCategory</implies>
+		</function>
+		 
+		<function id="addForum" name="Add Forum">
+			<!-- ui protection -->
+			<resource type="fragment">				
+				<id>acl://addForum</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.AdminController</class>
+				<method>addForum</method>				
+			</resource>
+			<implies>accessAdminTool</implies>
+			<implies>viewCategory</implies>
+			<implies>viewForum</implies>
+		</function>
+		
+		<function id="editForum" name="Edit Forum">
+			<!-- ui protection -->
+			<resource type="fragment">				
+				<id>acl://editForum</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction" criteriaId="editForum://action">				
+				<class>org.jboss.portlet.forums.ui.action.AdminController</class>
+				<method>editForum</method>				
+			</resource>
+			<implies>accessAdminTool</implies>
+			<implies>viewCategory</implies>
+			<implies>viewForum</implies>
+			<implies>addForum</implies>
+		</function>
+		 		  
+		<function id="deleteForum" name="Delete Forum">
+			<!-- ui protection -->
+			<resource type="fragment">				
+				<id>acl://deleteForum</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction" criteriaId="deleteForum://action">				
+				<class>org.jboss.portlet.forums.ui.action.AdminController</class>
+				<method>deleteForum</method>				
+			</resource>
+			<implies>accessAdminTool</implies>
+			<implies>viewCategory</implies>
+			<implies>viewForum</implies>
+			<implies>addForum</implies>
+			<implies>editForum</implies>
+		</function>  
+	</module>
+	
+	<!-- Message Board usecases -->
+	<module id="messageBoard" name="Message Board">
+		<!-- messageBoard navigation related -->
+		<function id="readCategory" name="Read Category">
+			<!-- ui protection -->
+			<resource type="fragment" criteriaId="readCategory://ui">
+				<id>acl://readCategory</id>
+			</resource>
+		</function>		
+		<function id="readForum" name="Read Forum">
+			<!-- ui protection -->
+			<resource type="fragment" criteriaId="readForum://ui">
+				<id>acl://readForum</id>
+			</resource>
+			<implies>readCategory</implies>
+		</function>
+	
+		<!-- posting related -->
+		<function id="post" name="Post a Message">
+			<!-- ui protection -->
+			<resource type="fragment">
+				<id>acl://newTopic</id>
+			</resource>
+			<resource type="fragment">
+				<id>acl://reply</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.NewTopic</class>
+				<method>execute</method>				
+			</resource>
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.ReplyTopic</class>
+				<method>execute</method>				
+			</resource>			
+		</function>						
+		<function id="editPost" name="Edit a Post">
+			<!-- ui protection -->
+			<resource type="fragment" criteriaId="editPost://ui">
+				<id>acl://editPost</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction" criteriaId="editPost://action">				
+				<class>org.jboss.portlet.forums.ui.action.EditPost</class>
+				<method>execute</method>				
+			</resource>			
+			<implies>post</implies>
+		</function>		
+		<function id="deletePost" name="Delete a Post">			
+			<!-- ui protection -->
+			<resource type="fragment">
+				<id>acl://deletePost</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.DeletePost</class>
+				<method>confirmDelete</method>				
+			</resource>			
+			<implies>post</implies>
+			<implies>editPost</implies>
+		</function>
+		
+		<!-- post attachment related -->
+		<function id="managePostAttachments" name="Manage Post Attachments">
+			<!-- ui protection -->
+			<resource type="fragment">
+				<id>acl://managePostAttachments</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.PostAction</class>
+				<method>addAttachment</method>				
+			</resource>
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.PostAction</class>
+				<method>deleteAttachment</method>				
+			</resource>
+		</function>						
+		
+		<!-- post poll related -->
+		<function id="votePoll" name="Vote for a Poll">			
+			<!-- ui protection -->
+			<resource type="fragment">
+				<id>acl://votePoll</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.PollController</class>
+				<method>vote</method>				
+			</resource>
+		</function>								
+		<function id="managePoll" name="Manage a Poll">
+			<!-- ui protection -->
+			<resource type="fragment">
+				<id>acl://managePoll</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.PostAction</class>
+				<method>deleteOption</method>				
+			</resource>
+			<implies>votePoll</implies>
+		</function>				
+	</module>		
+	
+	<!-- Moderator Tool usecases -->	
+	<module id="moderatorTool" name="Moderator Tool">
+		<function id="moderateForum" name="Ability to Access the Moderator Tool">
+			<!-- ui protection -->
+			<resource type="fragment">
+				<id>acl://moderateForum</id>
+			</resource>
+		</function>
+		<function id="deleteTopics" name="Ability to Delete Topics in the Forum">
+			<!-- ui protection -->
+			<resource type="fragment">
+				<id>acl://deleteTopics</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.ModeratorAction</class>
+				<method>deleteTopic</method>				
+			</resource>
+			<implies>moderateForum</implies>
+		</function>
+		<function id="moveTopics" name="Ability to Move Topics in the Forum">
+			<!-- ui protection -->
+			<resource type="fragment">
+				<id>acl://moveTopics</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.ModeratorAction</class>
+				<method>moveTopic</method>				
+			</resource>
+			<implies>moderateForum</implies>
+		</function>
+		<function id="lockTopics" name="Ability to Lock Topics in the Forum">
+			<!-- ui protection -->
+			<resource type="fragment">
+				<id>acl://lockTopics</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.ModeratorAction</class>
+				<method>lockTopic</method>				
+			</resource>
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.ModeratorAction</class>
+				<method>unlockTopic</method>				
+			</resource>
+			<implies>moderateForum</implies>
+		</function>		
+		<!-- splitting a topic -->
+		<function id="splitTopic" name="Ability to Split a Topic in the Forum">
+			<!-- ui protection -->
+			<resource type="fragment">
+				<id>acl://splitTopic</id>
+			</resource>
+			<!-- action protection -->
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.SplitTopic</class>
+				<method>splitPosts</method>				
+			</resource>
+			<resource type="jsfAction">				
+				<class>org.jboss.portlet.forums.ui.action.SplitTopic</class>
+				<method>splitAfter</method>				
+			</resource>
+			<implies>moderateForum</implies>
+		</function>
+	</module>
+</acl>
\ No newline at end of file

Added: labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml
===================================================================
--- labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/acl-permissions.xml	2006-07-27 17:18:21 UTC (rev 5316)
@@ -0,0 +1,124 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!--
+	Each role contains a set of permissions. Each permission/no-permission points to a function in the system that this role has/doesnot have access to.
+ -->
+
+<acl>				
+	<!--  dynamic roles/permissions defined for the application at runtime (either through the GUI or directly modifying this xml file) -->	
+	<!--
+			Sample permission = 
+			<permission functionId="editCategory"/>	 //plain without criteria
+			
+			<permission functionId="editCategory"> //complicated with criteria specification
+				<criteria context="jsfAction">target.categoryName.indexOf('sandbox') != -1</criteria>			
+				<criteria context="fragment">param[0].categoryName.toLowerCase().indexOf('sandbox') != -1</criteria>
+			</permission>				
+	-->
+	
+	<!--  
+		built-in system defined roles 
+	-->
+	<!-- non-logged in users -->
+	<role name="Anonymous" id="anonymous">	
+		<!-- Forums Admin Tool permissions -->
+		
+		
+		<!-- Message Board permissions -->
+		<!-- giving anonymous users permission to view only the Unit Testing Category of Forums -->
+		<!--permission action="readCategory">
+			<criteria for="readCategory://ui">param[0].title.toLowerCase().startsWith('unit testing')</criteria>
+		</permission-->	
+		<permission action="readForum"/>
+		
+		
+		<!-- Moderator Tool permissions -->									
+	</role>
+	
+	<!-- just a regular registered user -->	
+	<role name="User" id="user">
+		<!-- Forums Admin Tool permissions -->		
+		
+		<!-- Message Board permissions -->		
+		<permission action="readForum"/>
+		<permission action="post"/>
+		<!-- permission to edit only my own posts -->
+		<permission action="editPost">
+			<criteria for="editPost://ui">param[0].poster.user.userName.equals(identity.identity.userName)</criteria>
+			<criteria for="editPost://action">target.post.poster.user.userName.equals(identity.identity.userName)</criteria>
+		</permission>
+		
+		
+		<!-- Moderator Tool permissions -->			
+	</role>
+	
+	<!-- users with Admin privileges -->	
+	<role name="Admin" id="admin">
+		<!-- Forums Admin Tool permissions -->			
+		
+		
+		<!-- Message Board permissions -->
+		
+		
+		
+		<!-- Moderator Tool permissions -->			
+		
+		<!-- wild card permission -->
+		<permission action="all"/>		
+	</role>		
+	
+	<!-- 
+		deployment specific roles......just examples of how fine grained permissions can be assigned
+		this is an example of how the rules would possibly setup for JBoss.org Forums...
+		These policy rules vary for each consumer of forums depending on their own requirements of
+		access control security 
+	-->
+	
+	<!-- permissions specific to the Drools Team -->
+	<role name="Drools Team" id="droolsTeam">
+		<!-- Forums Admin Tool permissions -->
+		<permission action="viewCategory">
+			<criteria for="viewCategory://ui">param[0].title.toLowerCase().startsWith('jboss rules')</criteria>
+		</permission>
+		<permission action="deleteCategory">
+			<criteria for="deleteCategory://action">target.categoryName.toLowerCase().startsWith('jboss rules')</criteria>
+			<!-- also criteria for the implied edit category permission -->
+			<criteria for="editCategory://action">target.categoryName.toLowerCase().startsWith('jboss rules')</criteria>
+		</permission>
+		<permission action="viewForum">
+			<criteria for="viewForum://ui">param[0].name.toLowerCase().startsWith('jboss rules')</criteria>
+		</permission>			
+		<permission action="deleteForum">
+			<criteria for="deleteForum://action">target.forumName.toLowerCase().startsWith('jboss rules')</criteria>
+			<!-- also criteria for the implied edit category permission -->
+			<criteria for="editForum://action">target.forumName.toLowerCase().startsWith('jboss rules')</criteria>
+		</permission>
+		
+		<!-- Message Board permissions -->
+		<permission action="readCategory">
+			<criteria for="readCategory://ui">param[0].title.toLowerCase().startsWith('jboss rules')</criteria>
+		</permission>
+		<permission action="readForum"/>	
+		
+		
+		<!-- Moderator Tool permissions -->			
+	</role>
+	
+	<!-- permissions specific to the JBPM Team -->
+	<role name="JBPM Team" id="jbpmTeam">
+		<!-- Forums Admin Tool permissions -->
+		
+		<!-- Message Board permissions -->	
+				
+		<!-- Moderator Tool permissions -->		
+	</role>
+	
+	<!-- permissions specific to the Seam Team -->
+	<role name="Seam Team" id="seamTeam">
+		<!-- Forums Admin Tool permissions -->
+		
+		<!-- Message Board permissions -->	
+				
+		<!-- Moderator Tool permissions -->		
+	</role>
+</acl>
\ No newline at end of file

Added: labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/jboss-service.xml
===================================================================
--- labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/jboss-service.xml	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/authz-jaae-plugin/src/resources/forums-authz-plugin.sar/META-INF/jboss-service.xml	2006-07-27 17:18:21 UTC (rev 5316)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<server>
+	<!--  configure the AclKernelFactory that starts and registers the proper AclKernel implementation -->
+	<mbean code="org.jboss.security.acl.AclKernelFactory" 
+	name="org.jboss.security.acl.AclKernelFactory:service=aclKernelFactory"
+	xmbean-dd=""
+	>
+	    <attribute name="aclKernel">org.jboss.security.acl.JBossAclKernel</attribute>
+		<xmbean>
+			<class>org.jboss.security.acl.AclKernelFactory</class>
+			<constructor>
+      				<description>The no-arg constructor</description>
+      				<name>org.jboss.security.acl.AclKernelFactory</name>
+   			</constructor>
+			<attribute access="read-write" getMethod="getAclKernel" setMethod="setAclKernel">
+				     <name>aclKernel</name>
+					 <type>java.lang.String</type>
+					 <descriptors>
+					 	<default value="org.jboss.security.acl.JBossAclKernel"/>
+					 </descriptors>
+		    </attribute>	  
+		    <operation>
+		    	<description>The start lifecycle operation</description>
+		    	<name>start</name>
+		    </operation>
+		    <operation>
+		    	<description>The stop lifecycle operation</description>
+		    	<name>stop</name>
+		    </operation>
+		</xmbean>
+	</mbean>
+</server>
\ No newline at end of file

Modified: labs/jbossforums/trunk/build/build.xml
===================================================================
--- labs/jbossforums/trunk/build/build.xml	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/build/build.xml	2006-07-27 17:18:21 UTC (rev 5316)
@@ -111,11 +111,12 @@
 
          <!-- Modules -->	     
          <module name="forums"/>
+		 <module name="authz-jaae-plugin"/>
       	 
          
          <!-- setup the default group -->
          <group name="default">
-	   		<include modules="forums"/>
+	   		<include modules="forums,authz-jaae-plugin"/>
          </group>
          
       </moduleconfig>

Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml	2006-07-27 17:18:21 UTC (rev 5316)
@@ -8,11 +8,11 @@
 	<!-- general application configuration -->
 	<application>
 	    <!-- jbossportal-facelets integration -->
-	    <!--property-resolver>org.jboss.portal.faces.el.DelegatingPropertyResolver</property-resolver>
-	    <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler-->
+	    <property-resolver>org.jboss.portal.faces.el.DelegatingPropertyResolver</property-resolver>
+	    <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
 	    
 	    <!-- standalone facelets integration -->
-    	<view-handler>com.sun.facelets.FaceletViewHandler</view-handler> 
+    	<!--view-handler>com.sun.facelets.FaceletViewHandler</view-handler--> 
     	
     	<!-- custom action listener with integrated authorization checking -->
     	<action-listener>org.jboss.portlet.forums.auth.AuthorizationListener</action-listener>

Added: labs/jbossforums/trunk/thirdparty/jakarta-commons-jexl/lib/commons-jexl-1.0.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossforums/trunk/thirdparty/jakarta-commons-jexl/lib/commons-jexl-1.0.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossforums/trunk/thirdparty/jboss-jaae-engine/lib/jboss-acl.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossforums/trunk/thirdparty/jboss-jaae-engine/lib/jboss-acl.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossforums/trunk/thirdparty/jboss-jaae-engine/lib/jboss-identity-management.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossforums/trunk/thirdparty/jboss-jaae-engine/lib/jboss-identity-management.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossforums/trunk/thirdparty/jboss-jaae-engine/lib/jboss-security-common.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossforums/trunk/thirdparty/jboss-jaae-engine/lib/jboss-security-common.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: labs/jbossforums/trunk/tools/etc/buildfragments/libraries.ent
===================================================================
--- labs/jbossforums/trunk/tools/etc/buildfragments/libraries.ent	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/tools/etc/buildfragments/libraries.ent	2006-07-27 17:18:21 UTC (rev 5316)
@@ -150,5 +150,19 @@
 		"
    />
   </path>
+
+  <!-- JBoss JAAE engine dependency for the authorization plugin -->  
+  <property name="jboss-jaae-engine.root" value="${project.thirdparty}/jboss-jaae-engine"/>
+  <property name="jboss-jaae-engine.lib" value="${jboss-jaae-engine.root}/lib"/>
+  <path id="jboss-jaae-engine.classpath">
+    <filelist dir="${jboss-jaae-engine.lib}" files="jboss-acl.jar,jboss-identity-management.jar,jboss-security-common.jar"/>
+  </path>
+
+  <!-- Jakarta Common JEXL dependency -->  
+  <property name="jakarta-commons-jexl.root" value="${project.thirdparty}/jakarta-commons-jexl"/>
+  <property name="jakarta-commons-jexl.lib" value="${jakarta-commons-jexl.root}/lib"/>
+  <path id="jakarta-commons-jexl.classpath">
+    <filelist dir="${jakarta-commons-jexl.lib}" files="commons-jexl-1.0.jar"/>
+  </path>
   
 </target>

Modified: labs/jbossforums/trunk/tools/etc/buildfragments/modules.ent
===================================================================
--- labs/jbossforums/trunk/tools/etc/buildfragments/modules.ent	2006-07-27 16:05:01 UTC (rev 5315)
+++ labs/jbossforums/trunk/tools/etc/buildfragments/modules.ent	2006-07-27 17:18:21 UTC (rev 5316)
@@ -2,6 +2,18 @@
 
 <target name="configure-modules" unless="configure-modules.disabled">
 
-  
+  <!-- main forums module -->
+  <property name="forums.root" value="${project.root}/forums/output"/>
+  <property name="forums.lib" value="${forums.root}/lib"/>
+  <path id="forums.classpath">
+    <pathelement path="${forums.lib}/portal-forums-ui.jar"/>
+  </path>
 
+  <!-- Authorization plugin based on JAAE module -->
+  <property name="authz-jaae-plugin.root" value="${project.root}/authz-jaae-plugin/output"/>
+  <property name="authz-jaae-plugin.lib" value="${authz-jaae-plugin.root}/lib"/>
+  <path id="authz-jaae-plugin.classpath">
+    <pathelement path="${authz-jaae-plugin.lib}/forums-authz-plugin.jar"/>
+  </path>
+
 </target>




More information about the jboss-svn-commits mailing list