Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
0.5
-
None
-
None
-
Glassfish 4 / Weld 2.0.4
Description
I believe this is the documented method for securing pages, but the following view configuration does not invoke an AccessDecisionVoter.
@View(navigation = NavigationMode.REDIRECT)
public interface Pages extends ViewConfig {
class LogIn implements Pages {}
@Secured(value = ApplicationAccessDecisionVoter.class, errorView = LogIn.class)
class Manage implements Pages {}
}
I also tried with a @Sterotype @Secured annotation which I've confirmed to be working perfectly when placed on a CDI business method.
@Retention(RetentionPolicy.RUNTIME)
@Target(
)
@Documented
@Stereotype
@Secured(value = ApplicationAccessDecisionVoter.class, errorView = LogIn.class)
public @interface LoggedIn {
}
@View(navigation = NavigationMode.REDIRECT)
public interface Pages extends ViewConfig {
class LogIn implements Pages {}
@LoggedIn
class Manage implements Pages {}
}