3 Replies Latest reply on Dec 23, 2011 12:18 AM by Jason Porter

    Seam 3 security - annotations member access

    baecks Newbie


      I set up security for my SEMA 3 (faces) application. Doing so means defining a number of enums and applying annotations (example below):

      public interface Pages {
           static enum Pages1 {
                // @AccessDeniedView("/denied.xhtml")
                @User(foo = "test")

      With @User defined like this:

      @Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD})
      public @interface User {
           @Nonbinding String foo() default "ALL";

      I'd now like to write one (and only one) authorizer method for @User, in which I can get access to the foo property that of the annotation applied to the enum for which the method is executed. I would be something like this:

      @Secures @User boolean validate(){
        if(@User.foo().isEmpty()) return false;

      I'd appreciate if somebody could let me know if/home this is possible in Seam 3.