Author: sohil.shah(a)jboss.com
Date: 2009-08-08 23:00:18 -0400 (Sat, 08 Aug 2009)
New Revision: 13711
Added:
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/resources/hibernate.cfg.xml
Modified:
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/pom.xml
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/main/java/org/exoplatform/portal/jboss/security/provisioning/ExoPolicyProvisioner.java
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/JBossAbstractSharedPageACL.java
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/JBossAbstractTestUserACL.java
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/TestJBossCreatePortalACL.java
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/TestJBossPageNavACL.java
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/TestJBossPortalConfigACL.java
Log:
adapting to latest security framework codebase
Modified:
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/pom.xml
===================================================================
---
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/pom.xml 2009-08-09
01:04:24 UTC (rev 13710)
+++
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/pom.xml 2009-08-09
03:00:18 UTC (rev 13711)
@@ -90,15 +90,16 @@
<dependency>
<groupId>org.jboss.security</groupId>
<artifactId>jboss-xacml</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3.SP2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.security</groupId>
<artifactId>jboss-sunxacml</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3.SP2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
+
<!-- Drools -->
<dependency>
<groupId>org.drools</groupId>
@@ -194,7 +195,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <skip>true</skip>
+ <skip>false</skip>
</configuration>
</plugin>
</plugins>
Modified:
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/main/java/org/exoplatform/portal/jboss/security/provisioning/ExoPolicyProvisioner.java
===================================================================
---
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/main/java/org/exoplatform/portal/jboss/security/provisioning/ExoPolicyProvisioner.java 2009-08-09
01:04:24 UTC (rev 13710)
+++
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/main/java/org/exoplatform/portal/jboss/security/provisioning/ExoPolicyProvisioner.java 2009-08-09
03:00:18 UTC (rev 13711)
@@ -6,6 +6,7 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
+import java.util.Set;
import org.apache.log4j.Logger;
@@ -191,7 +192,7 @@
}
//Provision the Policy for this Portal
- this.policyProvisioner.composeAndDeploy(context);
+ this.policyProvisioner.deploy(context);
}
catch(URISyntaxException uriexception)
{
@@ -281,7 +282,7 @@
context.addPolicyRule(Effect.PERMIT, ownerType, identity);
}
- this.policyProvisioner.composeAndDeploy(context);
+ this.policyProvisioner.deploy(context);
}
catch(URISyntaxException uriexception)
{
@@ -343,7 +344,7 @@
context.addPolicyRule(Effect.PERMIT, new Write(), identity);
}
- this.policyProvisioner.composeAndDeploy(context);
+ this.policyProvisioner.deploy(context);
}
catch(URISyntaxException uriexception)
{
@@ -390,7 +391,7 @@
}
}
- this.policyProvisioner.composeAndDeploy(context);
+ this.policyProvisioner.deploy(context);
}
catch(Throwable t)
{
@@ -404,7 +405,7 @@
try
{
//Assert Policy State of the Server
- Policy[] policies = this.policyProvisioner.readAllPolicies();
+ Set<Policy> policies = this.policyProvisioner.readAllPolicies();
if(policies != null)
{
Modified:
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/JBossAbstractSharedPageACL.java
===================================================================
---
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/JBossAbstractSharedPageACL.java 2009-08-09
01:04:24 UTC (rev 13710)
+++
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/JBossAbstractSharedPageACL.java 2009-08-09
03:00:18 UTC (rev 13711)
@@ -355,7 +355,7 @@
// Store the policy into the Policy Server
PolicyMetaData policyMetaData = this.policyComposer.compose(context);
- this.provisioner.newPolicy(policyMetaData);
+ this.provisioner.deploy(policyMetaData);
}
//
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Modified:
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/JBossAbstractTestUserACL.java
===================================================================
---
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/JBossAbstractTestUserACL.java 2009-08-09
01:04:24 UTC (rev 13710)
+++
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/JBossAbstractTestUserACL.java 2009-08-09
03:00:18 UTC (rev 13711)
@@ -3,6 +3,7 @@
*/
package org.exoplatform.portal.config.security.jboss;
+import java.util.Set;
import java.util.List;
import java.util.ArrayList;
@@ -100,7 +101,7 @@
protected void dumpPolicyRepository() throws Exception
{
//Assert Policy State of the Server
- Policy[] policies = this.provisioner.readAllPolicies();
+ Set<Policy> policies = this.provisioner.readAllPolicies();
if(policies != null)
{
Modified:
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/TestJBossCreatePortalACL.java
===================================================================
---
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/TestJBossCreatePortalACL.java 2009-08-09
01:04:24 UTC (rev 13710)
+++
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/TestJBossCreatePortalACL.java 2009-08-09
03:00:18 UTC (rev 13711)
@@ -81,7 +81,7 @@
"allowExpression");
}
- this.provisioner.composeAndDeploy(context);
+ this.provisioner.deploy(context);
}
/**
Modified:
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/TestJBossPageNavACL.java
===================================================================
---
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/TestJBossPageNavACL.java 2009-08-09
01:04:24 UTC (rev 13710)
+++
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/TestJBossPageNavACL.java 2009-08-09
03:00:18 UTC (rev 13711)
@@ -170,7 +170,7 @@
// Store the policy into the Policy Server
PolicyMetaData policyMetaData = this.policyComposer.compose(context);
- this.provisioner.newPolicy(policyMetaData);
+ this.provisioner.deploy(policyMetaData);
}
//
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
/**
Modified:
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/TestJBossPortalConfigACL.java
===================================================================
---
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/TestJBossPortalConfigACL.java 2009-08-09
01:04:24 UTC (rev 13710)
+++
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/jboss/TestJBossPortalConfigACL.java 2009-08-09
03:00:18 UTC (rev 13711)
@@ -242,7 +242,7 @@
// Store the policy into the Policy Server
PolicyMetaData policyMetaData = this.policyComposer.compose(context);
- this.provisioner.newPolicy(policyMetaData);
+ this.provisioner.deploy(policyMetaData);
}
//
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Added:
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/resources/hibernate.cfg.xml
===================================================================
---
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/resources/hibernate.cfg.xml
(rev 0)
+++
jbossexo/branches/security-integration-sandbox/portal/trunk/component/portal/src/test/resources/hibernate.cfg.xml 2009-08-09
03:00:18 UTC (rev 13711)
@@ -0,0 +1,59 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+ <!-- Database connection settings -->
+ <property
name="connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property
name="connection.url">jdbc:hsqldb:file:target/testdb</property>
+ <property name="connection.username">sa</property>
+ <property name="connection.password"></property>
+
+ <!-- JDBC connection pool (use the built-in) -->
+ <property name="connection.pool_size">1</property>
+
+ <!-- SQL dialect -->
+ <property
name="dialect">org.hibernate.dialect.HSQLDialect</property>
+
+ <!-- Enable Hibernate's automatic session context management -->
+ <property
name="current_session_context_class">thread</property>
+
+ <!-- Disable the second-level cache -->
+ <property
name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
+
+ <!-- Echo all executed SQL to stdout -->
+ <property name="show_sql">false</property>
+
+ <!--
+ Drop and re-create the database schema on startup
+ -->
+ <property name="hbm2ddl.auto">create</property>
+
+ <mapping resource="policy.hbm.xml"/>
+ </session-factory>
+</hibernate-configuration>
\ No newline at end of file