[
https://jira.jboss.org/jira/browse/JBSEAM-3352?page=com.atlassian.jira.pl...
]
Shane Bryzak commented on JBSEAM-3352:
--------------------------------------
This is intentional - if you're not using a method to access the property value, then
the field should be public. Also, cls.getDeclaredFields() doesn't return inherited
fields.
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
Assignee: Shane Bryzak
Priority: Minor
The new permission annotations (@PermissionUser,@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