{
return User.isLoggedIn();
}
});
ActionHandler.setHandler(AribaAction.LogoutAction, new ActionHandler() {
public AWResponseGenerating actionClicked (AWRequestContext requestContext)
{
// Force user to anonymous and kill session
User.bindUserToSession(User.getAnonymous(), requestContext.session());
// MetaNavTabBar.invalidateState(requestContext.session());
requestContext.session().terminate();
return AWComponentActionRequestHandler.SharedInstance.processFrontDoorRequest(requestContext);
}
});
ConditionHandler.setHandler("disableLogoutAction", new ConditionHandler() {
public boolean evaluateCondition (AWRequestContext requestContext)
{
return !User.isLoggedIn();
}
});
if (allowAccessWithoutLogin) {
ConditionHandler.setHandler("showLoginAction", new ConditionHandler() {
public boolean evaluateCondition (AWRequestContext requestContext)
{
return !User.isLoggedIn();
}
});
ActionHandler.setHandler("login", new ActionHandler() {
public AWResponseGenerating actionClicked (AWRequestContext requestContext)
{
// force a login
if (!User.isLoggedIn()) throw new AWSessionValidationException();
return null;