Author: shane.bryzak(a)jboss.com
Date: 2010-07-05 23:45:21 -0400 (Mon, 05 Jul 2010)
New Revision: 13333
Added:
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/seam-beans.xml
Modified:
modules/security/trunk/examples/idmconsole/pom.xml
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityPermission.java
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/beans.xml
Log:
add permission annotations, fix xml configuration
Modified: modules/security/trunk/examples/idmconsole/pom.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/pom.xml 2010-07-06 01:00:46 UTC (rev
13332)
+++ modules/security/trunk/examples/idmconsole/pom.xml 2010-07-06 03:45:21 UTC (rev
13333)
@@ -76,6 +76,11 @@
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.jboss.seam.xml</groupId>
+ <artifactId>seam-xml-config</artifactId>
+ </dependency>
+
<!-- CDI (JSR-299) -->
<dependency>
<groupId>javax.enterprise</groupId>
Modified:
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityPermission.java
===================================================================
---
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityPermission.java 2010-07-06
01:00:46 UTC (rev 13332)
+++
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityPermission.java 2010-07-06
03:45:21 UTC (rev 13333)
@@ -1,5 +1,7 @@
package org.jboss.seam.security.examples.idmconsole.model;
+import static org.jboss.seam.security.annotations.permission.PermissionPropertyType.*;
+
import java.io.Serializable;
import javax.persistence.Entity;
@@ -8,6 +10,8 @@
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
+import org.jboss.seam.security.annotations.permission.PermissionProperty;
+
/**
* This entity stores ACL permissions
*
@@ -47,7 +51,7 @@
*
* @return
*/
- @NotNull @ManyToOne
+ @NotNull @ManyToOne @PermissionProperty(IDENTITY)
public IdentityObject getIdentityObject()
{
return identityObject;
@@ -67,7 +71,7 @@
*
* @return
*/
- @ManyToOne
+ @ManyToOne @PermissionProperty(RELATIONSHIP_TYPE)
public IdentityObjectRelationshipType getRelationshipType()
{
return relationshipType;
@@ -85,6 +89,7 @@
*
* @return
*/
+ @PermissionProperty(RELATIONSHIP_NAME)
public String getRelationshipName()
{
return relationshipName;
@@ -100,6 +105,7 @@
*
* @return
*/
+ @PermissionProperty(RESOURCE)
public String getResource()
{
return resource;
@@ -117,6 +123,7 @@
*
* @return
*/
+ @PermissionProperty(PERMISSION)
public String getPermission()
{
return permission;
Modified: modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/beans.xml
===================================================================
---
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/beans.xml 2010-07-06
01:00:46 UTC (rev 13332)
+++
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/beans.xml 2010-07-06
03:45:21 UTC (rev 13333)
@@ -5,15 +5,8 @@
-->
<beans
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:s="urn:java:seam:core"
- xmlns:perm="org.jboss.seam.security.permission"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
- <perm:JpaPermissionStore>
- <s:specializes/>
-
-
<perm:identityPermissionClass>org.jboss.seam.security.examples.idmconsole.model.IdentityPermission</perm:identityPermissionClass>
- </perm:JpaPermissionStore>
</beans>
Added:
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/seam-beans.xml
===================================================================
---
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/seam-beans.xml
(rev 0)
+++
modules/security/trunk/examples/idmconsole/src/main/webapp/WEB-INF/classes/seam-beans.xml 2010-07-06
03:45:21 UTC (rev 13333)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ The contents of this file is permitted to be empty.
+ The schema definition is provided for your convenience.
+-->
+<beans
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:s="urn:java:seam:core"
+ xmlns:perm="org.jboss.seam.security.permission"
+ xsi:schemaLocation="
+
http://java.sun.com/xml/ns/javaee
+
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+
+ <perm:JpaPermissionStore>
+ <s:specializes/>
+
+
<perm:identityPermissionClass>org.jboss.seam.security.examples.idmconsole.model.IdentityPermission</perm:identityPermissionClass>
+ </perm:JpaPermissionStore>
+</beans>