0 Replies Latest reply on Mar 5, 2013 6:30 AM by haisheng mi

    why typesafe security binding dont work without @Model annotations?

    haisheng mi Newbie

      the security-authorization  is an official examples in seam-3.1.0.Final.


      this example have a class named PrivilegedActions to demonstrate typesafe security binding.


      for example, if login user dosnt hava a admin roles , the program will throw  authentication Exceptions when executing "doSomethingRestricted" method.


      if i removed the @Model annotations,the program dont check  authentication of admin at all.


      my question is if i do not  use @Model annotations and hope typesafe security actually work,how can i do ???


      thanks very much!!!!






      class PrivilegedActions {

          @Inject Messages messages;



          public void doSomethingRestricted() {

              messages.info("doSomethingRestricted() invoked");






          public void doLoggedIn() {

              messages.info("doLoggedIn() invoked");