Author: shane.bryzak(a)jboss.com
Date: 2008-06-03 20:18:06 -0400 (Tue, 03 Jun 2008)
New Revision: 8322
Modified:
trunk/src/main/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java
Log:
JBSEAM-3064
Modified:
trunk/src/main/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java
===================================================================
---
trunk/src/main/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java 2008-06-04
00:17:32 UTC (rev 8321)
+++
trunk/src/main/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java 2008-06-04
00:18:06 UTC (rev 8322)
@@ -93,21 +93,21 @@
if (securityContext == null) return false;
List<FactHandle> handles = new ArrayList<FactHandle>();
-
- if (!(target instanceof String) && !(target instanceof Class))
- {
- handles.add( securityContext.insert(target) );
- }
- else if (target instanceof Class)
- {
- String componentName = Seam.getComponentName((Class) target);
- target = componentName != null ? componentName : ((Class) target).getName();
- }
-
+
PermissionCheck check = new PermissionCheck(target, action);
synchronized( securityContext )
{
+ if (!(target instanceof String) && !(target instanceof Class))
+ {
+ handles.add( securityContext.insert(target) );
+ }
+ else if (target instanceof Class)
+ {
+ String componentName = Seam.getComponentName((Class) target);
+ target = componentName != null ? componentName : ((Class) target).getName();
+ }
+
try
{
synchronizeContext();
@@ -146,21 +146,20 @@
RoleCheck roleCheck = new RoleCheck(roleName);
List<FactHandle> handles = new ArrayList<FactHandle>();
-
- if (!(target instanceof String) && !(target instanceof Class))
- {
- handles.add( securityContext.insert(target) );
- }
- else if (target instanceof Class)
- {
- String componentName = Seam.getComponentName((Class) target);
- target = componentName != null ? componentName : ((Class) target).getName();
- }
-
PermissionCheck check = new PermissionCheck(target, action);
synchronized( securityContext )
{
+ if (!(target instanceof String) && !(target instanceof Class))
+ {
+ handles.add( securityContext.insert(target) );
+ }
+ else if (target instanceof Class)
+ {
+ String componentName = Seam.getComponentName((Class) target);
+ target = componentName != null ? componentName : ((Class) target).getName();
+ }
+
try
{
synchronizeContext();
Show replies by thread