[seam-commits] Seam SVN: r8112 - in trunk/src/main/org/jboss/seam/security/permission: action and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon May 5 03:39:59 EDT 2008


Author: shane.bryzak at jboss.com
Date: 2008-05-05 03:39:59 -0400 (Mon, 05 May 2008)
New Revision: 8112

Modified:
   trunk/src/main/org/jboss/seam/security/permission/PersistentPermissionResolver.java
   trunk/src/main/org/jboss/seam/security/permission/action/PermissionSearch.java
Log:
minor

Modified: trunk/src/main/org/jboss/seam/security/permission/PersistentPermissionResolver.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/permission/PersistentPermissionResolver.java	2008-05-05 07:16:12 UTC (rev 8111)
+++ trunk/src/main/org/jboss/seam/security/permission/PersistentPermissionResolver.java	2008-05-05 07:39:59 UTC (rev 8112)
@@ -35,16 +35,12 @@
 {      
    private PermissionStore permissionStore;
    
-   private IdentifierPolicy identifierPolicy;
-   
    private static final LogProvider log = Logging.getLogProvider(PersistentPermissionResolver.class);   
    
    @Create
    public void create()
    {
       initPermissionStore();
-      
-      identifierPolicy = (IdentifierPolicy) Component.getInstance(IdentifierPolicy.class, true);
    }
    
    protected void initPermissionStore()
@@ -77,12 +73,10 @@
       
       Identity identity = Identity.instance();
       
-      if (!identity.isLoggedIn()) return false;
+      if (!identity.isLoggedIn()) return false;      
       
-      String identifier = identifierPolicy.getIdentifier(target);
+      List<Permission> permissions = permissionStore.listPermissions(target, action);
       
-      List<Permission> permissions = permissionStore.listPermissions(identifier, action);
-      
       String username = identity.getPrincipal().getName();
       
       for (Permission permission : permissions)

Modified: trunk/src/main/org/jboss/seam/security/permission/action/PermissionSearch.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/permission/action/PermissionSearch.java	2008-05-05 07:16:12 UTC (rev 8111)
+++ trunk/src/main/org/jboss/seam/security/permission/action/PermissionSearch.java	2008-05-05 07:39:59 UTC (rev 8112)
@@ -37,4 +37,14 @@
       this.target = target;      
       permissions = permissionManager.listPermissions(target);
    }
+   
+   public Object getTarget()
+   {
+      return target;
+   }
+   
+   public Permission getSelectedPermission()
+   {
+      return selectedPermission;
+   }
 }




More information about the seam-commits mailing list