[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3352) New Permission annotations works only on method level

Vinicius Carvalho (JIRA) jira-events at lists.jboss.org
Fri Aug 29 14:56:38 EDT 2008


New Permission annotations works only on method level 
------------------------------------------------------

                 Key: JBSEAM-3352
                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3352
             Project: Seam
          Issue Type: Bug
          Components: Security
    Affects Versions: 2.1.0.BETA1
            Reporter: Vinicius Carvalho
            Priority: Minor


The new permission annotations (@PermissionUser, at PermissionRole) are working only when methods gets annotated with them. The problem is on the AnnotatedBeanProperty class which checks for 

 public static AnnotatedBeanProperty scanForProperty(Class cls, Class<? extends Annotation> annotation)
   {
      for (Field f : cls.getFields())
      {
         if (f.isAnnotationPresent(annotation)) 
         {
            return new AnnotatedBeanProperty(f, f.getAnnotation(annotation));
         }
      }

It should be cls.getDeclaredFields() since f.getFields only returns public fields.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list