[seam-commits] Seam SVN: r12489 - modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Apr 14 06:03:30 EDT 2010


Author: shane.bryzak at jboss.com
Date: 2010-04-14 06:03:29 -0400 (Wed, 14 Apr 2010)
New Revision: 12489

Modified:
   modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java
Log:
JBSEAM-4479


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-04-14 09:58:06 UTC (rev 12488)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java	2010-04-14 10:03:29 UTC (rev 12489)
@@ -23,7 +23,6 @@
 import org.jboss.seam.security.annotations.permission.PermissionTarget;
 import org.jboss.seam.security.annotations.permission.PermissionUser;
 import org.jboss.seam.security.management.IdentityManager;
-import org.jboss.seam.security.management.IdentityStore;
 import org.jboss.seam.security.management.JpaIdentityStore;
 import org.jboss.seam.security.management.LdapIdentityStore;
 import org.jboss.seam.security.permission.PermissionMetadata.ActionSet;
@@ -43,7 +42,7 @@
    
    private Logger log = LoggerFactory.getLogger(LdapIdentityStore.class);
    
-   private enum Discrimination { user, role, either }
+   protected enum Discrimination { user, role, either }
    
    private Class<?> userPermissionClass;
    private Class<?> rolePermissionClass;
@@ -154,7 +153,8 @@
     * @param discrimination A discrimination (either user, role or both), required
     * @return Query The query generated for the provided parameters
     */
-   protected Query createPermissionQuery(Object target, Set targets, Principal recipient, Discrimination discrimination)
+   protected Query createPermissionQuery(Object target, Set<?> targets, 
+         Principal recipient, Discrimination discrimination)
    {
       if (target != null && targets != null)
       {
@@ -274,7 +274,8 @@
          {
             if (rolePermissionClass != null)
             {
-               List permissions = createPermissionQuery(target, null, recipient, Discrimination.role).getResultList();
+               List<?> permissions = createPermissionQuery(target, null, 
+                     recipient, Discrimination.role).getResultList();
 
                if (permissions.isEmpty())
                {
@@ -350,7 +351,7 @@
             throw new RuntimeException("Could not grant permission, userPermissionClass not set");
          }
                          
-         List permissions = createPermissionQuery(target, null, recipient, recipientIsRole ?
+         List<?> permissions = createPermissionQuery(target, null, recipient, recipientIsRole ?
                Discrimination.role : Discrimination.user).getResultList();
 
          if (permissions.isEmpty())



More information about the seam-commits mailing list