[seam-commits] Seam SVN: r13300 - 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
Thu Jun 24 18:02:10 EDT 2010


Author: shane.bryzak at jboss.com
Date: 2010-06-24 18:02:10 -0400 (Thu, 24 Jun 2010)
New Revision: 13300

Removed:
   modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RoleImpl.java
   modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RoleType.java
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/PersistentPermissionResolver.java
   modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java
Log:
cleanup


Deleted: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RoleImpl.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RoleImpl.java	2010-06-24 21:56:41 UTC (rev 13299)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RoleImpl.java	2010-06-24 22:02:10 UTC (rev 13300)
@@ -1,49 +0,0 @@
-package org.jboss.seam.security;
-
-import org.picketlink.idm.api.Group;
-import org.picketlink.idm.api.RoleType;
-import org.picketlink.idm.api.User;
-
-/**
- * Seam implementation of the PicketLink Role interface.  Each role is a direct
- * one-to-one mapping between User and Group.  
- *  
- * @author Shane Bryzak
- */
-public class RoleImpl implements org.picketlink.idm.api.Role 
-{   
-   private static final long serialVersionUID = 1187276024036531700L;
-   
-   private boolean conditional;
-   
-   private Group group;
-   private RoleType roleType;
-   private User user;
-   
-   public RoleImpl(Group group, RoleType roleType, User user)
-   {
-      this.group = group;
-      this.roleType = roleType;
-      this.user = user;
-   }
-     
-   public boolean isConditional()
-   {
-      return conditional;
-   }
-
-   public Group getGroup()
-   {
-      return group;
-   }
-
-   public RoleType getRoleType()
-   {
-      return roleType;
-   }
-
-   public User getUser()
-   {
-      return user;
-   }
-}

Deleted: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RoleType.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RoleType.java	2010-06-24 21:56:41 UTC (rev 13299)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RoleType.java	2010-06-24 22:02:10 UTC (rev 13300)
@@ -1,23 +0,0 @@
-package org.jboss.seam.security;
-
-/**
- * Seam implementation of the PicketLink RoleType interface.  A RoleType is
- * essentially the name of a particular role.  E.g. manager, user, superuser, etc.
- * 
- * @author Shane Bryzak
- */
-public class RoleType implements org.picketlink.idm.api.RoleType
-{
-   private String name;
-   
-   public RoleType(String name)
-   {
-      this.name = name;
-   }
-   
-   public String getName()
-   {
-      return name;
-   }
-
-}

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-06-24 21:56:41 UTC (rev 13299)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java	2010-06-24 22:02:10 UTC (rev 13300)
@@ -16,7 +16,6 @@
 import javax.persistence.EntityManager;
 import javax.persistence.Query;
 
-import org.jboss.seam.security.RoleImpl;
 import org.jboss.seam.security.annotations.permission.PermissionAction;
 import org.jboss.seam.security.annotations.permission.PermissionRecipient;
 import org.jboss.seam.security.annotations.permission.PermissionRecipientType;
@@ -264,7 +263,7 @@
    protected boolean updatePermissionActions(Object target, Principal recipient, String[] actions,
          boolean set)
    {
-      boolean recipientIsRole = recipient instanceof RoleImpl;
+      boolean recipientIsRole = false; //recipient instanceof RoleImpl;
       
       try
       {
@@ -532,7 +531,7 @@
     */
    protected Object resolvePrincipalEntity(Principal recipient)
    {
-      boolean recipientIsRole = recipient instanceof RoleImpl;
+      boolean recipientIsRole = false; //recipient instanceof RoleImpl;
             
       //if (identityManager.getIdentityStore() != null //&& 
             //identityManager.getIdentityStore() instanceof JpaIdentityStore)

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-06-24 21:56:41 UTC (rev 13299)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java	2010-06-24 22:02:10 UTC (rev 13300)
@@ -9,7 +9,6 @@
 import javax.inject.Inject;
 
 import org.jboss.seam.security.Identity;
-import org.jboss.seam.security.RoleImpl;
 import org.jboss.seam.security.SimplePrincipal;
 
 /**
@@ -55,9 +54,9 @@
             return true;
          }
          
-         if (permission.getRecipient() instanceof RoleImpl)
-         {
-            RoleImpl role = (RoleImpl) permission.getRecipient();
+         //if (permission.getRecipient() instanceof RoleImpl)
+         //{
+           // RoleImpl role = (RoleImpl) permission.getRecipient();
             
             // TODO fix this
             /*if (role.isConditional())
@@ -68,7 +67,7 @@
             {
                return true;
             }*/
-         }
+         //}
       }
       
       return false;
@@ -100,9 +99,9 @@
                   break;
                }
                
-               if (permission.getRecipient() instanceof RoleImpl)
-               {
-                  RoleImpl role = (RoleImpl) permission.getRecipient();
+               //if (permission.getRecipient() instanceof RoleImpl)
+               //{
+                 // RoleImpl role = (RoleImpl) permission.getRecipient();
                   
                   // TODO fix this
                   /*
@@ -119,7 +118,7 @@
                      iter.remove();
                      break;
                   }*/
-               }
+               //}
             }
          }
       }

Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java	2010-06-24 21:56:41 UTC (rev 13299)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java	2010-06-24 22:02:10 UTC (rev 13300)
@@ -23,7 +23,6 @@
 //import org.jboss.seam.drools.SeamGlobalResolver;
 import org.jboss.seam.security.Identity;
 import org.jboss.seam.security.IdentityImpl;
-import org.jboss.seam.security.RoleImpl;
 import org.jboss.seam.security.events.PostLoggedOutEvent;
 import org.jboss.seam.security.events.PostAuthenticateEvent;
 import org.slf4j.Logger;
@@ -217,8 +216,8 @@
                   Principal role = (Principal) e.nextElement();
    
                   boolean found = false;
-                  Iterator<?> iter = getSecurityContext().getObjects(
-                        new ClassObjectFilter(RoleImpl.class)).iterator();
+                  //Iterator<?> iter = getSecurityContext().getObjects(
+                  //      new ClassObjectFilter(RoleImpl.class)).iterator();
                   
                   // TODO fix
                   /*
@@ -242,10 +241,10 @@
             }
          }
          
-         Iterator<?> iter = getSecurityContext().getObjects(new ClassObjectFilter(RoleImpl.class)).iterator();
-         while (iter.hasNext())
-         {
-            RoleImpl r = (RoleImpl) iter.next();
+         //Iterator<?> iter = getSecurityContext().getObjects(new ClassObjectFilter(RoleImpl.class)).iterator();
+         //while (iter.hasNext())
+         //{
+            //RoleImpl r = (RoleImpl) iter.next();
             
             // TODO fix
             /*if (!identity.hasRole(r.getName()))
@@ -253,7 +252,7 @@
                FactHandle fh = getSecurityContext().getFactHandle(r);
                getSecurityContext().retract(fh);
             }*/
-         }
+         //}
       }
    }
    



More information about the seam-commits mailing list