You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-commits@incubator.apache.org by cl...@apache.org on 2005/11/22 23:43:16 UTC

svn commit: r348294 - in /incubator/graffito/trunk/components/src: java/META-INF/ java/org/apache/portals/graffito/model/pemission/impl/ java/org/apache/portals/graffito/model/permission/ java/org/apache/portals/graffito/model/permission/impl/ java/org...

Author: clombart
Date: Tue Nov 22 15:42:52 2005
New Revision: 348294

URL: http://svn.apache.org/viewcvs?rev=348294&view=rev
Log:
* Support Jetspeed2 - apply patch provided by Randy
* Review deployment. 
* Clean-up the code used for the permission management. CmsPermissionImpl was duplicate.
* Rename an incorrect pck name 

Added:
    incubator/graffito/trunk/components/src/java/META-INF/security-atn.xml
    incubator/graffito/trunk/components/src/java/META-INF/security-atz.xml
    incubator/graffito/trunk/components/src/java/META-INF/security-managers.xml
    incubator/graffito/trunk/components/src/java/META-INF/security-providers.xml
    incubator/graffito/trunk/components/src/java/META-INF/security-spi-atn.xml
    incubator/graffito/trunk/components/src/java/META-INF/security-spi-atz.xml
    incubator/graffito/trunk/components/src/java/META-INF/security-spi.xml
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/permission/
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/permission/impl/
      - copied from r290797, incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/pemission/impl/
Removed:
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/pemission/impl/
Modified:
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/permission/impl/CmsPermissionCollection.java
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/permission/impl/CmsPermissionImpl.java
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/persistence/impl/DatasourceEnabledSpringTestCase.java
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/AbstractSecurityTestcase.java
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/CmsAccessControllerImpl.java
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/GraffitoAction.java
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/services/core/impl/ContentPermissionServiceImpl.java
    incubator/graffito/trunk/components/src/schema/security-schema.xml
    incubator/graffito/trunk/components/src/sql/GraffitoServer/insert-j2-security.sql
    incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/AllFilesTestRdbmsPolicy.java
    incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/AllPermissionTestRdbmsPolicy.java
    incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/TestPermissions.java
    incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/TestRdbmsPolicy.java

Added: incubator/graffito/trunk/components/src/java/META-INF/security-atn.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/META-INF/security-atn.xml?rev=348294&view=auto
==============================================================================
--- incubator/graffito/trunk/components/src/java/META-INF/security-atn.xml (added)
+++ incubator/graffito/trunk/components/src/java/META-INF/security-atn.xml Tue Nov 22 15:42:52 2005
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+Copyright 2004 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.
+-->
+<beans>
+  
+  <!-- ************** Login Module ************** -->
+  <!-- Security: Login Module Proxy -->
+  <bean id="org.apache.jetspeed.security.LoginModuleProxy" 
+  	   class="org.apache.jetspeed.security.impl.LoginModuleProxyImpl"
+  >  	   
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.UserManager"/></constructor-arg>  	   
+  </bean>
+
+</beans>

Added: incubator/graffito/trunk/components/src/java/META-INF/security-atz.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/META-INF/security-atz.xml?rev=348294&view=auto
==============================================================================
--- incubator/graffito/trunk/components/src/java/META-INF/security-atz.xml (added)
+++ incubator/graffito/trunk/components/src/java/META-INF/security-atz.xml Tue Nov 22 15:42:52 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+Copyright 2004 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.
+-->
+<beans>
+
+  <!-- Security: RDBMS Policy implementation for JAAS -->
+  <bean id="org.apache.jetspeed.security.impl.RdbmsPolicy" 
+  	   class="org.apache.jetspeed.security.impl.RdbmsPolicy"
+  >  	   
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.PermissionManager"/></constructor-arg>  	   
+  </bean>
+
+</beans>

Added: incubator/graffito/trunk/components/src/java/META-INF/security-managers.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/META-INF/security-managers.xml?rev=348294&view=auto
==============================================================================
--- incubator/graffito/trunk/components/src/java/META-INF/security-managers.xml (added)
+++ incubator/graffito/trunk/components/src/java/META-INF/security-managers.xml Tue Nov 22 15:42:52 2005
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+Copyright 2004 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.
+-->
+<beans>
+  
+  <!-- Security: User Manager -->
+  <bean id="org.apache.jetspeed.security.UserManager" 
+  	   class="org.apache.jetspeed.security.impl.UserManagerImpl"
+  >  	   
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.SecurityProvider"/></constructor-arg>
+  </bean>
+  
+   <!-- Security: Group Manager -->
+  <bean id="org.apache.jetspeed.security.GroupManager" 
+  	   class="org.apache.jetspeed.security.impl.GroupManagerImpl"
+  >  	   
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.SecurityProvider"/></constructor-arg>   
+  </bean>
+  
+  <!-- Security: Role Manager -->
+  <bean id="org.apache.jetspeed.security.RoleManager" 
+  	   class="org.apache.jetspeed.security.impl.RoleManagerImpl"
+  >  	   
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.SecurityProvider"/></constructor-arg>   
+  </bean>
+  
+  <!-- Security: Permission Manager -->
+  <bean id="org.apache.jetspeed.security.impl.PermissionManagerImpl" 
+  	   class="org.apache.jetspeed.security.impl.PermissionManagerImpl"  />
+  
+  <bean id="org.apache.jetspeed.security.PermissionManager" parent="baseTransactionProxy" 
+		name="permissionManager" >
+		<property name="proxyInterfaces">
+			<value>org.apache.jetspeed.security.PermissionManager</value>
+		</property>
+		<property name="target">
+			<ref bean="org.apache.jetspeed.security.impl.PermissionManagerImpl"/>
+		</property>
+		<property name="transactionAttributes">
+			<props>				
+				<prop key="remove*">PROPAGATION_REQUIRED</prop>
+				<prop key="grant*">PROPAGATION_REQUIRED</prop>
+				<prop key="revoke*">PROPAGATION_REQUIRED</prop>
+				<prop key="grant*">PROPAGATION_REQUIRED</prop>
+				<prop key="add*">PROPAGATION_REQUIRED</prop>
+				<prop key="*">PROPAGATION_SUPPORTS</prop>
+			</props>
+		</property>
+   </bean>
+
+</beans>

Added: incubator/graffito/trunk/components/src/java/META-INF/security-providers.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/META-INF/security-providers.xml?rev=348294&view=auto
==============================================================================
--- incubator/graffito/trunk/components/src/java/META-INF/security-providers.xml (added)
+++ incubator/graffito/trunk/components/src/java/META-INF/security-providers.xml Tue Nov 22 15:42:52 2005
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+Copyright 2004 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.
+-->
+<beans>
+
+  <!-- ************** Security Providers ************** -->
+  <!-- Security: Default Authentication Provider -->
+  <bean id="org.apache.jetspeed.security.AuthenticationProvider" 
+  	   class="org.apache.jetspeed.security.impl.AuthenticationProviderImpl"
+  >  	   
+  	   <constructor-arg index="0"><value>DefaultAuthenticator</value></constructor-arg>
+  	   <constructor-arg index="1"><value>The default authenticator</value></constructor-arg>
+  	   <constructor-arg index="2"><value>login.conf</value></constructor-arg>
+  	   <constructor-arg index="3"><ref bean="org.apache.jetspeed.security.spi.CredentialHandler"/></constructor-arg>
+  	   <constructor-arg index="4"><ref bean="org.apache.jetspeed.security.spi.UserSecurityHandler"/></constructor-arg>
+  </bean>
+  
+  <!-- Security: Authentication Provider Proxy -->
+  <bean id="org.apache.jetspeed.security.AuthenticationProviderProxy" 
+  	   class="org.apache.jetspeed.security.impl.AuthenticationProviderProxyImpl"
+  >  	   
+  	   <constructor-arg >
+  	   		<list>
+  	   			<ref bean="org.apache.jetspeed.security.AuthenticationProvider"/>
+  	   		</list>
+  	   </constructor-arg>
+  	   <constructor-arg ><value>DefaultAuthenticator</value></constructor-arg>
+  </bean>
+  
+  <!-- Security: Security Provider -->
+  <bean id="org.apache.jetspeed.security.SecurityProvider" 
+  	   class="org.apache.jetspeed.security.impl.SecurityProviderImpl"
+  >  	   
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.AuthenticationProviderProxy"/></constructor-arg>
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.spi.RoleSecurityHandler"/></constructor-arg>
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.spi.GroupSecurityHandler"/></constructor-arg>
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.spi.SecurityMappingHandler"/></constructor-arg>
+  </bean>
+  
+  <!-- Security: Authorization Provider -->
+  <bean id="org.apache.jetspeed.security.AuthorizationProvider" 
+  	   class="org.apache.jetspeed.security.impl.AuthorizationProviderImpl"
+  >  	   
+  	   <constructor-arg index="0"><ref bean="org.apache.jetspeed.security.impl.RdbmsPolicy"/></constructor-arg>
+  	   <!-- Does not use the default policy as a default behavior -->
+  	   <constructor-arg index="1"><value>false</value></constructor-arg>   
+  </bean>
+
+</beans>

Added: incubator/graffito/trunk/components/src/java/META-INF/security-spi-atn.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/META-INF/security-spi-atn.xml?rev=348294&view=auto
==============================================================================
--- incubator/graffito/trunk/components/src/java/META-INF/security-spi-atn.xml (added)
+++ incubator/graffito/trunk/components/src/java/META-INF/security-spi-atn.xml Tue Nov 22 15:42:52 2005
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+Copyright 2004 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.
+-->
+<beans>
+
+  <!-- ************** Security SPI Handlers ************** -->
+
+  <!-- require a non-empty password -->
+  <bean id="org.apache.jetspeed.security.spi.CredentialPasswordValidator" 
+       class="org.apache.jetspeed.security.spi.impl.DefaultCredentialPasswordValidator"/>
+
+  <!-- MessageDigest encode passwords using SHA-1 -->
+  <bean id="org.apache.jetspeed.security.spi.CredentialPasswordEncoder" 
+       class="org.apache.jetspeed.security.spi.impl.MessageDigestCredentialPasswordEncoder">
+       <constructor-arg index="0"><value>SHA-1</value></constructor-arg>       
+  </bean>       
+
+  <bean id="org.apache.jetspeed.security.spi.PasswordCredentialProvider" 
+       class="org.apache.jetspeed.security.spi.impl.DefaultPasswordCredentialProvider">
+       <constructor-arg index="0"><ref bean="org.apache.jetspeed.security.spi.CredentialPasswordValidator"/></constructor-arg>       
+       <constructor-arg index="1"><ref bean="org.apache.jetspeed.security.spi.CredentialPasswordEncoder"/></constructor-arg>       
+  </bean>       
+
+  <!-- allow multiple InternalPasswordCredentialInterceptors to be used for DefaultCredentialHandler --> 
+  <bean id="org.apache.jetspeed.security.spi.InternalPasswordCredentialInterceptor"
+       class="org.apache.jetspeed.security.spi.impl.InternalPasswordCredentialInterceptorsProxy">
+       <constructor-arg index="0">
+         <list>
+           <!-- enforce an invalid preset password value in the persisent store is required to be changed -->
+           <bean class="org.apache.jetspeed.security.spi.impl.ValidatePasswordOnLoadInterceptor"/>
+
+           <!-- ensure preset cleartext passwords in the persistent store  will be encoded on first use -->
+           <bean class="org.apache.jetspeed.security.spi.impl.EncodePasswordOnFirstLoadInterceptor"/>
+         </list>
+       </constructor-arg>
+  </bean>
+
+  <!-- Security SPI: CredentialHandler -->
+  <bean id="org.apache.jetspeed.security.spi.CredentialHandler" 
+       class="org.apache.jetspeed.security.spi.impl.DefaultCredentialHandler"
+  >       
+       <constructor-arg index="0"><ref bean="org.apache.jetspeed.security.spi.SecurityAccess"/></constructor-arg>       
+       <constructor-arg index="1"><ref bean="org.apache.jetspeed.security.spi.PasswordCredentialProvider"/></constructor-arg>       
+       <constructor-arg index="2"><ref bean="org.apache.jetspeed.security.spi.InternalPasswordCredentialInterceptor"/></constructor-arg>       
+  </bean>
+  
+  <!-- Security SPI: UserSecurityHandler -->
+  <!-- The DefaultUSerSecurityHandler uses the raw SecurityAccessImpl so that it
+  	   may demarcate its own transactions -->
+  <bean id="org.apache.jetspeed.security.spi.UserSecurityHandlerImpl" 
+  	   class="org.apache.jetspeed.security.spi.impl.DefaultUserSecurityHandler"
+  >  	   
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.spi.SecurityAccess"/></constructor-arg>  	   
+  </bean>
+  
+  <bean id="org.apache.jetspeed.security.spi.UserSecurityHandler" parent="baseTransactionProxy" 
+		name="userSecurityHandler" >
+		<property name="proxyInterfaces">
+			<value>org.apache.jetspeed.security.spi.UserSecurityHandler</value>
+		</property>
+		<property name="target">
+			<ref bean="org.apache.jetspeed.security.spi.UserSecurityHandlerImpl"/>
+		</property>
+		<property name="transactionAttributes">
+			<props>				
+				<prop key="*">PROPAGATION_REQUIRED</prop>
+			</props>
+		</property>
+   </bean>
+
+</beans>

Added: incubator/graffito/trunk/components/src/java/META-INF/security-spi-atz.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/META-INF/security-spi-atz.xml?rev=348294&view=auto
==============================================================================
--- incubator/graffito/trunk/components/src/java/META-INF/security-spi-atz.xml (added)
+++ incubator/graffito/trunk/components/src/java/META-INF/security-spi-atz.xml Tue Nov 22 15:42:52 2005
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+Copyright 2004 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.
+-->
+<beans>
+
+  <!-- ************** Security SPI Handlers ************** -->  
+  <!-- Security SPI: RoleSecurityHandler -->
+  <bean id="org.apache.jetspeed.security.spi.RoleSecurityHandler" 
+  	   class="org.apache.jetspeed.security.spi.impl.DefaultRoleSecurityHandler"
+  >  	   
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.spi.SecurityAccess"/></constructor-arg>
+  </bean>
+  
+  <!-- Security SPI: GroupSecurityHandler -->
+  <bean id="org.apache.jetspeed.security.spi.GroupSecurityHandler" 
+  	   class="org.apache.jetspeed.security.spi.impl.DefaultGroupSecurityHandler"
+  >  	   
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.spi.SecurityAccess"/></constructor-arg>
+  </bean>
+  
+  <!-- Security SPI: SecurityMappingHandler -->
+  <bean id="org.apache.jetspeed.security.spi.SecurityMappingHandler" 
+  	   class="org.apache.jetspeed.security.spi.impl.DefaultSecurityMappingHandler"
+  >  	   
+  	   <constructor-arg ><ref bean="org.apache.jetspeed.security.spi.SecurityAccess"/></constructor-arg>
+  	   <!-- Default role hierarchy strategy is by generalization.  Add contructor-arg to change the strategy. -->
+  	   <!-- Default group hierarchy strategy is by generalization.  Add contructor-arg to change the strategy. -->
+  </bean>
+</beans>

Added: incubator/graffito/trunk/components/src/java/META-INF/security-spi.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/META-INF/security-spi.xml?rev=348294&view=auto
==============================================================================
--- incubator/graffito/trunk/components/src/java/META-INF/security-spi.xml (added)
+++ incubator/graffito/trunk/components/src/java/META-INF/security-spi.xml Tue Nov 22 15:42:52 2005
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+Copyright 2004 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.
+-->
+<beans>
+
+  <!-- ************** Security SPI Handlers ************** -->
+  <!-- Security SPI: CommonQueries -->
+  <bean id="org.apache.jetspeed.security.spi.impl.SecurityAccessImpl" 
+  	   class="org.apache.jetspeed.security.spi.impl.SecurityAccessImpl"
+  	   init-method="init"
+  >  	   
+  	   <constructor-arg ><value>JETSPEED-INF/ojb/security_repository.xml</value></constructor-arg>  	   
+  </bean>
+  
+  <bean id="org.apache.jetspeed.security.spi.SecurityAccess" parent="baseTransactionProxy" 
+		name="SecurityCommonQueries" >
+		<property name="proxyInterfaces">
+			<value>org.apache.jetspeed.security.spi.SecurityAccess</value>
+		</property>
+		<property name="target">
+			<ref bean="org.apache.jetspeed.security.spi.impl.SecurityAccessImpl"/>
+		</property>
+		<property name="transactionAttributes">
+			<props>				
+				<prop key="remove*">PROPAGATION_REQUIRED</prop>
+				<prop key="set*">PROPAGATION_REQUIRED</prop>
+				<prop key="*">PROPAGATION_SUPPORTS</prop>
+			</props>
+		</property>
+   </bean>
+
+</beans>

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/permission/impl/CmsPermissionCollection.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/permission/impl/CmsPermissionCollection.java?rev=348294&r1=290797&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/permission/impl/CmsPermissionCollection.java (original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/permission/impl/CmsPermissionCollection.java Tue Nov 22 15:42:52 2005
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.portals.graffito.model.pemission.impl;
+package org.apache.portals.graffito.model.permission.impl;
 
 import java.security.Permission;
 import java.security.PermissionCollection;

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/permission/impl/CmsPermissionImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/permission/impl/CmsPermissionImpl.java?rev=348294&r1=290797&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/permission/impl/CmsPermissionImpl.java (original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/permission/impl/CmsPermissionImpl.java Tue Nov 22 15:42:52 2005
@@ -14,12 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.portals.graffito.model.pemission.impl;
+package org.apache.portals.graffito.model.permission.impl;
 
 import java.security.Permission;
 import java.util.Collection;
 import java.util.StringTokenizer;
 
+import org.apache.jetspeed.security.PortalResourcePermission;
 import org.apache.portals.graffito.model.permission.CmsPermission;
 import org.apache.portals.graffito.security.impl.GraffitoAction;
 

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/persistence/impl/DatasourceEnabledSpringTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/persistence/impl/DatasourceEnabledSpringTestCase.java?rev=348294&r1=348293&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/persistence/impl/DatasourceEnabledSpringTestCase.java (original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/persistence/impl/DatasourceEnabledSpringTestCase.java Tue Nov 22 15:42:52 2005
@@ -47,6 +47,10 @@
         String driver = System.getProperty("org.apache.portals.graffito.database.driver");
         String user = System.getProperty("org.apache.portals.graffito.database.user");
         String password = System.getProperty("org.apache.portals.graffito.database.password");
+        if (password == null)
+        {
+        	password = "";
+        }
         datasourceComponent = new BoundDBCPDatasourceComponent(user, password, driver, url, 20, 5000,
                 GenericObjectPool.WHEN_EXHAUSTED_GROW, true, "graffitotest", jndi);
         datasourceComponent.start();

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/AbstractSecurityTestcase.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/AbstractSecurityTestcase.java?rev=348294&r1=348293&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/AbstractSecurityTestcase.java (original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/AbstractSecurityTestcase.java Tue Nov 22 15:42:52 2005
@@ -48,6 +48,7 @@
 import org.apache.portals.graffito.context.CmsRequestContext;
 import org.apache.portals.graffito.context.CmsRequestContextManager;
 import org.apache.portals.graffito.context.impl.CmsRequestContextImpl;
+import org.apache.portals.graffito.model.permission.impl.CmsPermissionImpl;
 import org.apache.portals.graffito.persistence.impl.PersistenceSupportedTestCase;
 import org.apache.portals.graffito.services.core.ContentPermissionService;
 
@@ -225,7 +226,13 @@
     {
         String[] confs = super.getConfigurations();
         List confList = new ArrayList(Arrays.asList(confs));
-        confList.add("META-INF/security.xml");        
+        confList.add("META-INF/security-spi.xml");        
+        confList.add("META-INF/security-spi-atn.xml");        
+        confList.add("META-INF/security-spi-atz.xml");        
+        confList.add("META-INF/security-atz.xml");        
+        confList.add("META-INF/security-atn.xml");        
+        confList.add("META-INF/security-providers.xml");        
+        confList.add("META-INF/security-managers.xml");        
         confList.add("META-INF/graffito-access-control.xml");
         return (String[]) confList.toArray(new String[confList.size()]);        
     }    
@@ -248,4 +255,4 @@
         }
         return principals;
     }
-}
\ No newline at end of file
+}

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/CmsAccessControllerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/CmsAccessControllerImpl.java?rev=348294&r1=348293&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/CmsAccessControllerImpl.java (original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/CmsAccessControllerImpl.java Tue Nov 22 15:42:52 2005
@@ -15,10 +15,15 @@
  */
 package org.apache.portals.graffito.security.impl;
 
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
 import javax.security.auth.Subject;
 
 import org.apache.portals.graffito.context.CmsRequestContextManager;
 import org.apache.portals.graffito.model.core.CmsObject;
+import org.apache.portals.graffito.model.permission.CmsPermission;
+import org.apache.portals.graffito.model.permission.impl.CmsPermissionImpl;
 import org.apache.portals.graffito.security.CmsAccessController;
 
 /**
@@ -63,7 +68,7 @@
         try
         {
             Subject subject = cmsRequestContextManager.getCurrentCmsRequestContext().getSubject();
-            Subject.doAs(subject, new GraffitoAction(uri, actions));
+            Subject.doAsPrivileged(subject, new GraffitoAction(uri, actions), null);
             return true;
         }
         catch (Exception e)
@@ -71,5 +76,25 @@
             return false;
         }
 
+        
+//        try
+//        {
+//        	Subject subject = cmsRequestContextManager.getCurrentCmsRequestContext().getSubject();
+//        	CmsPermission cmsPermission = new CmsPermissionImpl(uri, actions);
+//            Subject.doAsPrivileged(subject, new PrivilegedAction()                
+//            {
+//                public Object run()
+//                {
+//                    AccessController.checkPermission(cmsPermission);
+//                    return null;
+//                }
+//            }, null);
+//        }
+//        catch (Exception e)
+//        {
+//            return false;
+//        }
+//        return true;        
+        
     }
 }

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/GraffitoAction.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/GraffitoAction.java?rev=348294&r1=348293&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/GraffitoAction.java (original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/security/impl/GraffitoAction.java Tue Nov 22 15:42:52 2005
@@ -19,6 +19,7 @@
 import java.security.PrivilegedAction;
 
 import org.apache.portals.graffito.model.permission.CmsPermission;
+import org.apache.portals.graffito.model.permission.impl.CmsPermissionImpl;
 
 
 /**

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/services/core/impl/ContentPermissionServiceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/services/core/impl/ContentPermissionServiceImpl.java?rev=348294&r1=348293&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/services/core/impl/ContentPermissionServiceImpl.java (original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/services/core/impl/ContentPermissionServiceImpl.java Tue Nov 22 15:42:52 2005
@@ -36,8 +36,8 @@
 import org.apache.portals.graffito.exception.ContentManagementException;
 import org.apache.portals.graffito.model.core.CmsObject;
 import org.apache.portals.graffito.model.permission.CmsPermission;
+import org.apache.portals.graffito.model.permission.impl.CmsPermissionImpl;
 import org.apache.portals.graffito.services.core.ContentPermissionService;
-import org.apache.portals.graffito.security.impl.CmsPermissionImpl;
 
 
 /**

Modified: incubator/graffito/trunk/components/src/schema/security-schema.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/schema/security-schema.xml?rev=348294&r1=348293&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/schema/security-schema.xml (original)
+++ incubator/graffito/trunk/components/src/schema/security-schema.xml Tue Nov 22 15:42:52 2005
@@ -14,27 +14,33 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_1.dtd">
+<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_2.dtd">
 <!-- Autogenerated by JDBCToXMLSchema! -->
-<database>
+<database name="j2">
 <!--
     	CREATING TABLES FOR SINGLE SIGN ON (SSO)
     	It has dependency on the Security tables PRINCIPAL and CREDENTIALS
     -->
-
+        
+    <!--
+       Create Site to Principals association Table
+    -->
     <!--
        Create Security Principal Table
     -->
     <table name="SECURITY_PRINCIPAL">
         <column name="PRINCIPAL_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="CLASSNAME" required="true" size="254" type="VARCHAR"/>
-        <column name="IS_MAPPING_ONLY" required="true" type="BIT"/>
-        <column name="IS_ENABLED" required="true" type="BIT"/>
+        <column name="IS_MAPPING_ONLY" required="true" type="BOOLEANINT"/>
+        <column name="IS_ENABLED" required="true" type="BOOLEANINT"/>
         <column name="FULL_PATH" required="true" size="254" type="VARCHAR"/>
         <column name="CREATION_DATE" required="true" type="TIMESTAMP"/>
         <column name="MODIFIED_DATE" required="true" type="TIMESTAMP"/>
+        <unique name="UIX_SECURITY_PRINCIPAL">
+          <unique-column name="FULL_PATH" />
+        </unique>        
     </table>
-    
+
     <!--
        Create Security Permission Table
     -->
@@ -45,48 +51,46 @@
         <column name="ACTIONS" required="true" size="254" type="VARCHAR"/>
         <column name="CREATION_DATE" required="true" type="TIMESTAMP"/>
         <column name="MODIFIED_DATE" required="true" type="TIMESTAMP"/>
-    </table>    
-
+    </table>
+    
     <!--
        Create Security Principal Permission Table
     -->
     <table name="PRINCIPAL_PERMISSION">
         <column name="PRINCIPAL_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="PERMISSION_ID" primaryKey="true" required="true" type="INTEGER"/>
-        <foreign-key foreignTable="SECURITY_PERMISSION">
+        <foreign-key foreignTable="SECURITY_PERMISSION" onDelete="cascade">
             <reference foreign="PERMISSION_ID" local="PERMISSION_ID"/>
         </foreign-key>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="PRINCIPAL_ID"/>
         </foreign-key>
     </table>
-    
-
-    
-    
+        
     <!--
        Create Security Credential Table
     -->
     <table name="SECURITY_CREDENTIAL">
         <column name="CREDENTIAL_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="PRINCIPAL_ID" required="true" type="INTEGER"/>
-        <column name="VALUE" required="true" size="254" type="VARCHAR"/>
+        <column name="COLUMN_VALUE" required="true" size="254" type="VARCHAR"/>
         <column name="TYPE" required="true" type="SMALLINT"/>
         <column name="CLASSNAME" size="254" type="VARCHAR"/>
-        <column name="UPDATE_REQUIRED" required="true" type="BIT"/>
-        <column name="IS_ENCODED" required="true" type="BIT"/>
-        <column name="IS_ENABLED" required="true" type="BIT"/>
+        <column name="UPDATE_REQUIRED" required="true" type="BOOLEANINT"/>
+        <column name="IS_ENCODED" required="true" type="BOOLEANINT"/>
+        <column name="IS_ENABLED" required="true" type="BOOLEANINT"/>
         <column name="AUTH_FAILURES" required="true" type="SMALLINT"/>
-        <column name="IS_EXPIRED" required="true" type="BIT"/>
+        <column name="IS_EXPIRED" required="true" type="BOOLEANINT"/>
         <column name="CREATION_DATE" required="true" type="TIMESTAMP"/>
         <column name="MODIFIED_DATE" required="true" type="TIMESTAMP"/>
         <column name="PREV_AUTH_DATE" required="false" type="TIMESTAMP"/>
         <column name="LAST_AUTH_DATE" required="false" type="TIMESTAMP"/>
         <column name="EXPIRATION_DATE" required="false" type="DATE"/>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="PRINCIPAL_ID"/>
         </foreign-key>
     </table>
+	
 
     <!--
        Create SiteTable
@@ -95,21 +99,21 @@
         <column name="SITE_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="NAME" required="true" size="254" type="VARCHAR"/>
         <column name="URL" required="true" size="254" type="VARCHAR"/>
-        <column name="ALLOW_USER_SET" default="0" type="BIT"/>
-        <column name="REQUIRES_CERTIFICATE" default="0" type="BIT"/>
+        <column name="ALLOW_USER_SET" default="0" type="BOOLEANINT"/>
+        <column name="REQUIRES_CERTIFICATE" default="0" type="BOOLEANINT"/>
+        <unique name="UIX_SITE_URL">
+          <unique-column name="URL" />
+        </unique>                
     </table>
-    
-    <!--
-       Create Site to Principals association Table
-    -->
-    
+	
+	
     <table name="SSO_SITE_TO_PRINCIPALS">
     	<column name="SITE_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="PRINCIPAL_ID" primaryKey="true" required="true" type="INTEGER"/>
-         <foreign-key foreignTable="SSO_SITE">
+         <foreign-key foreignTable="SSO_SITE" onDelete="cascade">
             <reference foreign="SITE_ID" local="SITE_ID"/>
         </foreign-key>
-       <foreign-key foreignTable="SECURITY_PRINCIPAL">
+       <foreign-key foreignTable="SECURITY_PRINCIPAL" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="PRINCIPAL_ID"/>
         </foreign-key>
     </table>
@@ -118,29 +122,38 @@
        Create Principals to Remote Principals association Table
     -->
     
-    <table name="SSO_PRINCIPAL_TO_REMOTE_PRINCIPAL">
+    <table name="SSO_PRINCIPAL_TO_REMOTE">
     	<column name="PRINCIPAL_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="REMOTE_PRINCIPAL_ID" primaryKey="true" required="true" type="INTEGER"/>
-         <foreign-key foreignTable="SECURITY_PRINCIPAL">
+         <foreign-key foreignTable="SECURITY_PRINCIPAL" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="PRINCIPAL_ID"/>
         </foreign-key>
-       <foreign-key foreignTable="SECURITY_PRINCIPAL">
+       <foreign-key foreignTable="SECURITY_PRINCIPAL" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="REMOTE_PRINCIPAL_ID"/>
         </foreign-key>
     </table>
     
-
-     
+    <table name="SSO_SITE_TO_REMOTE">
+    	<column name="SITE_ID" primaryKey="true" required="true" type="INTEGER"/>
+        <column name="PRINCIPAL_ID" primaryKey="true" required="true" type="INTEGER"/>
+         <foreign-key foreignTable="SSO_SITE" onDelete="cascade">
+            <reference foreign="SITE_ID" local="SITE_ID"/>
+        </foreign-key>
+       <foreign-key foreignTable="SECURITY_PRINCIPAL" onDelete="cascade">
+            <reference foreign="PRINCIPAL_ID" local="PRINCIPAL_ID"/>
+        </foreign-key>
+    </table>
+         
     <!--
        Create Security User Role Table
     -->
     <table name="SECURITY_USER_ROLE">
         <column name="USER_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="ROLE_ID" primaryKey="true" required="true" type="INTEGER"/>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="ROLE_ID"/>
         </foreign-key>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="USER_ID"/>
         </foreign-key>
     </table>
@@ -151,10 +164,10 @@
     <table name="SECURITY_USER_GROUP">
         <column name="USER_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="GROUP_ID" primaryKey="true" required="true" type="INTEGER"/>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="GROUP_ID"/>
         </foreign-key>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="USER_ID"/>
         </foreign-key>
     </table>
@@ -165,12 +178,14 @@
     <table name="SECURITY_GROUP_ROLE">
         <column name="GROUP_ID" primaryKey="true" required="true" type="INTEGER"/>
         <column name="ROLE_ID" primaryKey="true" required="true" type="INTEGER"/>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="GROUP_ID"/>
         </foreign-key>
-        <foreign-key foreignTable="SECURITY_PRINCIPAL">
+        <foreign-key foreignTable="SECURITY_PRINCIPAL" onDelete="cascade">
             <reference foreign="PRINCIPAL_ID" local="ROLE_ID"/>
         </foreign-key>
     </table>
+
+        
     
 </database>

Modified: incubator/graffito/trunk/components/src/sql/GraffitoServer/insert-j2-security.sql
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/sql/GraffitoServer/insert-j2-security.sql?rev=348294&r1=348293&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/sql/GraffitoServer/insert-j2-security.sql (original)
+++ incubator/graffito/trunk/components/src/sql/GraffitoServer/insert-j2-security.sql Tue Nov 22 15:42:52 2005
@@ -13,5 +13,5 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 -----------------------------------------------------------------------------
-INSERT INTO SECURITY_PERMISSION VALUES(20,'org.apache.portals.graffito.security.impl.CmsPermissionImpl','/graffito/-','all','2004-05-22 16:27:12.572','2004-05-22 16:27:12.572');
+INSERT INTO SECURITY_PERMISSION VALUES(20,'org.apache.portals.graffito.model.permission.impl.CmsPermissionImpl','/graffito/-','all','2004-05-22 16:27:12.572','2004-05-22 16:27:12.572');
 INSERT INTO PRINCIPAL_PERMISSION VALUES(6, 20);

Modified: incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/AllFilesTestRdbmsPolicy.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/AllFilesTestRdbmsPolicy.java?rev=348294&r1=348293&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/AllFilesTestRdbmsPolicy.java (original)
+++ incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/AllFilesTestRdbmsPolicy.java Tue Nov 22 15:42:52 2005
@@ -23,6 +23,7 @@
 import org.apache.jetspeed.security.SecurityException;
 import org.apache.jetspeed.security.UserPrincipal;
 import org.apache.jetspeed.security.impl.UserPrincipalImpl;
+import org.apache.portals.graffito.model.permission.impl.CmsPermissionImpl;
 import org.apache.portals.graffito.security.CmsAccessController;
 
 /**

Modified: incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/AllPermissionTestRdbmsPolicy.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/AllPermissionTestRdbmsPolicy.java?rev=348294&r1=348293&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/AllPermissionTestRdbmsPolicy.java (original)
+++ incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/AllPermissionTestRdbmsPolicy.java Tue Nov 22 15:42:52 2005
@@ -23,6 +23,7 @@
 import org.apache.jetspeed.security.SecurityException;
 import org.apache.jetspeed.security.UserPrincipal;
 import org.apache.jetspeed.security.impl.UserPrincipalImpl;
+import org.apache.portals.graffito.model.permission.impl.CmsPermissionImpl;
 import org.apache.portals.graffito.security.CmsAccessController;
 
 /**

Modified: incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/TestPermissions.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/TestPermissions.java?rev=348294&r1=348293&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/TestPermissions.java (original)
+++ incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/TestPermissions.java Tue Nov 22 15:42:52 2005
@@ -29,6 +29,7 @@
 import org.apache.jetspeed.security.UserPrincipal;
 import org.apache.jetspeed.security.impl.UserPrincipalImpl;
 import org.apache.portals.graffito.model.permission.CmsPermission;
+import org.apache.portals.graffito.model.permission.impl.CmsPermissionImpl;
 import org.apache.portals.graffito.security.CmsAccessController;
 
 /**

Modified: incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/TestRdbmsPolicy.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/TestRdbmsPolicy.java?rev=348294&r1=348293&r2=348294&view=diff
==============================================================================
--- incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/TestRdbmsPolicy.java (original)
+++ incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/security/impl/TestRdbmsPolicy.java Tue Nov 22 15:42:52 2005
@@ -30,6 +30,7 @@
 import org.apache.jetspeed.security.UserPrincipal;
 import org.apache.jetspeed.security.impl.UserPrincipalImpl;
 import org.apache.portals.graffito.context.CmsRequestContext;
+import org.apache.portals.graffito.model.permission.impl.CmsPermissionImpl;
 import org.apache.portals.graffito.security.CmsAccessController;
 
 /**
@@ -103,7 +104,7 @@
 
         assertFalse("did not deny update permission on the folder.", cmsAccessController.hasPermission(
                 "/files/test.xml", "secure"));
-
+        
     }
     /**
      * Test permissions with wild card (eg. /file/*) & with recursive setting
@@ -147,7 +148,6 @@
         while (enum1.hasMoreElements())
         {
             Permission permission = (Permission) enum1.nextElement();
-
             System.out.println("Permission found - actions : " + permission.getActions() + " name : " + permission.getName());
         }