|
From: <fc...@us...> - 2008-02-25 11:59:26
|
Revision: 694
http://openutils.svn.sourceforge.net/openutils/?rev=694&view=rev
Author: fcarone
Date: 2008-02-25 03:59:31 -0800 (Mon, 25 Feb 2008)
Log Message:
-----------
Tests updated
Modified Paths:
--------------
trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/filter/JavaBeanFilterTest.java
trunk/openutils-hibernate-security/src/test/resources/SecurityIntegrationTest-load.xml
trunk/openutils-hibernate-security/src/test/resources/spring-security.xml
Added Paths:
-----------
trunk/openutils-hibernate-security/src/site/apt/
trunk/openutils-hibernate-security/src/site/apt/index.apt
Added: trunk/openutils-hibernate-security/src/site/apt/index.apt
===================================================================
--- trunk/openutils-hibernate-security/src/site/apt/index.apt (rev 0)
+++ trunk/openutils-hibernate-security/src/site/apt/index.apt 2008-02-25 11:59:31 UTC (rev 694)
@@ -0,0 +1,19 @@
+ --------------------------
+ O p e n u t i l s
+ --------------------------
+ Filippo Carone
+ --------------------------
+
+openutils-hibernate-security
+
+ openutils-hibernate-security provides base generic hibernate security classes, implementing a role based access control
+ (RBAC) on data managed through hibernate.
+
+
+ See the test classes for how to setup security and look at {{{apidocs/index.html}javadocs}} for more details.
+
+
+Released versions
+
+ Check it at {{{http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-hibernate-security}http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-hibernate-security}}
+
Modified: trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/filter/JavaBeanFilterTest.java
===================================================================
--- trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/filter/JavaBeanFilterTest.java 2008-02-25 09:56:14 UTC (rev 693)
+++ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/filter/JavaBeanFilterTest.java 2008-02-25 11:59:31 UTC (rev 694)
@@ -1,3 +1,18 @@
+/*
+ * Copyright Openmind http://www.openmindonline.it
+ *
+ * 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.
+ */
package it.openutils.hibernate.security.filter;
import it.openutils.hibernate.security.dataobject.ModifierEnum;
@@ -3,4 +18,5 @@
import it.openutils.hibernate.security.dataobject.PermissionEnum;
import it.openutils.hibernate.security.dataobject.SecurityRule;
+import it.openutils.hibernate.security.dataobject.StatusEnum;
import java.util.ArrayList;
@@ -10,11 +26,6 @@
import org.junit.Assert;
import org.junit.Test;
-
-/*
- * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it
- */
-
/**
* @author fcarone
* @version $Id$
@@ -39,6 +50,7 @@
rule.setProperty("entity");
rule.setRole("ROLE_1");
rule.setValue("VALUE");
+ rule.setStatus(StatusEnum.ENABLED);
SecurityRule rule2 = new SecurityRule();
rule2.setEntity("it.openutils.hibernate.security.dataobject.SecurityRule");
@@ -49,6 +61,7 @@
rule2.setProperty("value");
rule2.setRole("ROLE_1");
rule2.setValue("VALUE2");
+ rule2.setStatus(StatusEnum.ENABLED);
SecurityRule rule2b = new SecurityRule();
rule2b.setEntity("it.openutils.hibernate.security.dataobject.SecurityRule");
@@ -57,6 +70,7 @@
rule2b.setProperty("id");
rule2b.setRole("ROLE_1");
rule2b.setValue("4");
+ rule2b.setStatus(StatusEnum.ENABLED);
SecurityRule rule3 = new SecurityRule();
rule3.setEntity("it.openutils.hibernate.security.dataobject.SecurityRule");
@@ -67,6 +81,7 @@
rule3.setProperty("value");
rule3.setRole("ROLE_2");
rule3.setValue("VALUE3");
+ rule3.setStatus(StatusEnum.ENABLED);
rules.add(rule);
rules.add(rule2);
Modified: trunk/openutils-hibernate-security/src/test/resources/SecurityIntegrationTest-load.xml
===================================================================
--- trunk/openutils-hibernate-security/src/test/resources/SecurityIntegrationTest-load.xml 2008-02-25 09:56:14 UTC (rev 693)
+++ trunk/openutils-hibernate-security/src/test/resources/SecurityIntegrationTest-load.xml 2008-02-25 11:59:31 UTC (rev 694)
@@ -119,6 +119,8 @@
<column>PROPERTY</column>
<column>VALUE</column>
<column>MODIFIER</column>
+ <column>STATUS</column>
+ <column>DELETED</column>
<row>
<value>1</value>
<value>RoleUno</value>
@@ -126,6 +128,8 @@
<value>intValue</value>
<value>1</value>
<value>EQUALS</value>
+ <value>ENABLED</value>
+ <value>0</value>
</row>
<row>
<value>2</value>
@@ -134,6 +138,8 @@
<value>intValue</value>
<value>1</value>
<value>EQUALS</value>
+ <value>ENABLED</value>
+ <value>0</value>
</row>
<row>
<value>3</value>
@@ -142,7 +148,19 @@
<value>intValue</value>
<value>1</value>
<value>NOT</value>
+ <value>ENABLED</value>
+ <value>0</value>
</row>
+ <row>
+ <value>4</value>
+ <value>RoleTre</value>
+ <value>it.openutils.hibernate.security.apptest.DummyDataobject</value>
+ <value>intValue</value>
+ <value>1</value>
+ <value>NOT</value>
+ <value>ENABLED</value>
+ <value>1</value>
+ </row>
</table>
<table name="SECRULE_PERMISSION">
<column>ID_SECURITY_RULE</column>
Modified: trunk/openutils-hibernate-security/src/test/resources/spring-security.xml
===================================================================
--- trunk/openutils-hibernate-security/src/test/resources/spring-security.xml 2008-02-25 09:56:14 UTC (rev 693)
+++ trunk/openutils-hibernate-security/src/test/resources/spring-security.xml 2008-02-25 11:59:31 UTC (rev 694)
@@ -62,7 +62,6 @@
</property>
</bean>
-
<bean id="afterInvocationManager" class="org.acegisecurity.afterinvocation.AfterInvocationProviderManager">
<property name="providers">
<list>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|