[seam-commits] Seam SVN: r13334 - in modules/security/trunk/impl/src/main/java/org/jboss/seam/security: permission and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Jul 5 23:51:13 EDT 2010
Author: shane.bryzak at jboss.com
Date: 2010-07-05 23:51:13 -0400 (Mon, 05 Jul 2010)
New Revision: 13334
Modified:
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java
Log:
minor
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java 2010-07-06 03:45:21 UTC (rev 13333)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java 2010-07-06 03:51:13 UTC (rev 13334)
@@ -798,7 +798,7 @@
for (Property<Object> p : props)
{
- if (p.getJavaClass().isAnnotationPresent(Entity.class))
+ if (!p.isReadOnly() && p.getJavaClass().isAnnotationPresent(Entity.class))
{
List<Property<Object>> pp = PropertyQueries.createQuery(p.getJavaClass())
.addCriteria(new PropertyTypeCriteria(PropertyType.ATTRIBUTE))
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java 2010-07-06 03:45:21 UTC (rev 13333)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java 2010-07-06 03:51:13 UTC (rev 13334)
@@ -89,7 +89,7 @@
// TODO see if we can scan for this automatically
if (identityPermissionClass == null)
{
- log.debug("No permissionClass set, JpaPermissionStore will be unavailable.");
+ log.debug("No identityPermissionClass set, JpaPermissionStore will be unavailable.");
return;
}
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java 2010-07-06 03:45:21 UTC (rev 13333)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java 2010-07-06 03:51:13 UTC (rev 13334)
@@ -46,28 +46,31 @@
String username = identity.getPrincipal().getName();
- for (Permission permission : permissions)
- {
- if (permission.getIdentity() instanceof SimplePrincipal &&
- username.equals(permission.getIdentity().getName()))
+ if (permissions != null)
+ {
+ for (Permission permission : permissions)
{
- return true;
- }
-
- //if (permission.getRecipient() instanceof RoleImpl)
- //{
- // RoleImpl role = (RoleImpl) permission.getRecipient();
-
- // TODO fix this
- /*if (role.isConditional())
+ if (permission.getIdentity() instanceof SimplePrincipal &&
+ username.equals(permission.getIdentity().getName()))
{
- if (ruleBasedPermissionResolver.checkConditionalRole(role.getRoleType(), target, action)) return true;
+ return true;
}
- else if (identity.hasRole(role.getRoleType()))
- {
- return true;
- }*/
- //}
+
+ //if (permission.getRecipient() instanceof RoleImpl)
+ //{
+ // RoleImpl role = (RoleImpl) permission.getRecipient();
+
+ // TODO fix this
+ /*if (role.isConditional())
+ {
+ if (ruleBasedPermissionResolver.checkConditionalRole(role.getRoleType(), target, action)) return true;
+ }
+ else if (identity.hasRole(role.getRoleType()))
+ {
+ return true;
+ }*/
+ //}
+ }
}
return false;
More information about the seam-commits
mailing list