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!!!!
PrivilegedActions.java
======================
public
@Model
class PrivilegedActions {
@Inject Messages messages;
@Admin
public void doSomethingRestricted() {
messages.info("doSomethingRestricted() invoked");
}
....
@LoggedIn
public void doLoggedIn() {
messages.info("doLoggedIn() invoked");
}
....
}
======================