[seam-commits] Seam SVN: r8494 - trunk/src/main/org/jboss/seam/security/management.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Jul 23 02:30:53 EDT 2008
Author: shane.bryzak at jboss.com
Date: 2008-07-23 02:30:53 -0400 (Wed, 23 Jul 2008)
New Revision: 8494
Modified:
trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java
Log:
exclude conditional roles from role list
Modified: trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java 2008-07-23 05:51:33 UTC (rev 8493)
+++ trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java 2008-07-23 06:30:53 UTC (rev 8494)
@@ -104,7 +104,7 @@
if (userClass == null)
{
- log.debug("Error in JpaIdentityStore configuration - userClass must be configured.");
+ log.error("Error in JpaIdentityStore configuration - userClass must be configured.");
return;
}
@@ -716,9 +716,22 @@
public List<String> listRoles()
{
- return lookupEntityManager().createQuery(
- "select r." + roleNameProperty.getName() + " from " + roleClass.getName() + " r")
- .getResultList();
+ StringBuilder roleQuery = new StringBuilder();
+
+ roleQuery.append("select r.");
+ roleQuery.append(roleNameProperty.getName());
+ roleQuery.append(" from ");
+ roleQuery.append(roleClass.getName());
+ roleQuery.append(" r");
+
+ if (roleConditionalProperty != null)
+ {
+ roleQuery.append(" where r.");
+ roleQuery.append(roleConditionalProperty.getName());
+ roleQuery.append(" = false");
+ }
+
+ return lookupEntityManager().createQuery(roleQuery.toString()).getResultList();
}
protected void persistEntity(Object entity)
More information about the seam-commits
mailing list