deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Glauche <>
Subject AccessDecisionVoterContext not working for JSF pages
Date Wed, 02 Jul 2014 19:40:26 GMT

i'm trying to apply the DS (1.0.0) security example (Wildfly 8.1.0, 
weld, MyFaces 2.0.18) to the JSF module, specifically the @Secured and 
Stereotypes with custom Meta-data.

So, i did create:

public  @interface  Admin
   int  securityLevel();

When i use that annotation on a bean everything works fine:
public  class  RoleAccessDecisionVoter  implements  AccessDecisionVoter
     private  static  final  long  serialVersionUID  =  -8007511215776345835L;

   public  Set<SecurityViolation>  checkPermission(AccessDecisionVoterContext  voterContext)
         Admin  admin  =  voterContext.getMetaDataFor(Admin.class.getName(),  Admin.class);

does work, and will return the securitylevel from the bean.

But, when i use the annotation in the JSF views, the @Secured is working, but the Annotation
is not
found in the voterContext.

public interface Pages {
	  class Index implements ViewConfig { }
	  class Admin implements ViewConfig { }

in this case "admin" in the checkPermission is null ...

Am i missing something obvious? Is it supposed to work this way?

Kind regards,

View raw message