deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject deltaspike git commit: DELTASPIKE-1294 improvements in view of proxies and extensibility
Date Wed, 29 Nov 2017 16:07:34 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 7b55ff21d -> 126362e4f


DELTASPIKE-1294 improvements in view of proxies and extensibility


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/126362e4
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/126362e4
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/126362e4

Branch: refs/heads/master
Commit: 126362e4f049976b6b14a8cd627add1029321148
Parents: 7b55ff2
Author: gpetracek <gpetracek@apache.org>
Authored: Wed Nov 29 16:19:28 2017 +0100
Committer: gpetracek <gpetracek@apache.org>
Committed: Wed Nov 29 16:51:58 2017 +0100

----------------------------------------------------------------------
 .../impl/authorization/SecuredAnnotationAuthorizer.java         | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/126362e4/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/authorization/SecuredAnnotationAuthorizer.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/authorization/SecuredAnnotationAuthorizer.java
b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/authorization/SecuredAnnotationAuthorizer.java
index 9b16736..93a3798 100644
--- a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/authorization/SecuredAnnotationAuthorizer.java
+++ b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/authorization/SecuredAnnotationAuthorizer.java
@@ -19,6 +19,7 @@
 package org.apache.deltaspike.security.impl.authorization;
 
 import org.apache.deltaspike.core.api.provider.BeanProvider;
+import org.apache.deltaspike.core.util.ProxyUtils;
 import org.apache.deltaspike.security.api.authorization.AccessDecisionState;
 import org.apache.deltaspike.security.api.authorization.AccessDecisionVoter;
 import org.apache.deltaspike.security.api.authorization.AccessDecisionVoterContext;
@@ -78,7 +79,7 @@ public class SecuredAnnotationAuthorizer
         return true;
     }
 
-    private List<Annotation> extractMetadata(InvocationContext invocationContext)
+    protected List<Annotation> extractMetadata(InvocationContext invocationContext)
     {
         List<Annotation> result = new ArrayList<Annotation>();
 
@@ -88,7 +89,7 @@ public class SecuredAnnotationAuthorizer
         // so we fall back on the declaringClass of the method.
         Class<?> targetClass =
                 invocationContext.getTarget() != null
-                        ? invocationContext.getTarget().getClass()
+                        ? ProxyUtils.getUnproxiedClass(invocationContext.getTarget().getClass())
                         : method.getDeclaringClass();
 
 


Mime
View raw message