I have an action in Controller that is secured with @Check annotation.
@With(Secure.class)
public class Application extends Controller {
@Check("admin")
public static void securedMethod() {
//secured code
}
When I call this action from browser, it calls boolean check(String profile) from Security class. But when I call this action from another action:
Application.securedMethod();
it just calls secured code, omitting Security.check() call. I thought, @Check should not allow execution of securedMethod() unless Security.check() return true. Any ideas how can I make it behave like this?