@@ -0,0 +1,1674 @@
+package dev.openshift.tapestry.angular.pages.admin;%0D%0A%0D%0Aimport dev.openshift.tapestry.angular.services.AppModule;%0D%0Aimport org.apache.shiro.SecurityUtils;%0D%0Aimport org.apache.shiro.authz.annotation.RequiresPermissions;%0D%0Aimport org.apache.shiro.subject.Subject;%0D%0Aimport org.apache.tapestry5.Link;%0D%0Aimport org.apache.tapestry5.annotations.Log;%0D%0Aimport org.apache.tapestry5.annotations.Property;%0D%0Aimport org.apache.tapestry5.annotations.Secure;%0D%0Aimport org.apache.tapestry5.ioc.annotations.Inject;%0D%0Aimport org.apache.tapestry5.services.PageRenderLinkSource;%0D%0Aimport org.slf4j.Logger;%0D%0Aimport org.tynamo.security.internal.services.LoginContextService;%0D%0Aimport org.tynamo.security.services.SecurityService;%0D%0A%0D%0A@Secure%0D%0A@RequiresPermissions(AppModule.PERMISSION_ADMIN)%0D%0Apublic class Index%0D%0A%7B%0D%0A    @Inject%0D%0A    private Logger LOG;%0D%0A%0D%0A    @Inject%0D%0A    private SecurityService securityService;%0D%0A%0D%0A    @Inject%0D%0A    private LoginContextService loginContextService;%0D%0A%0D%0A    @Property%0D%0A    private String principal;%0D%0A%0D%0A    @Inject%0D%0A    private PageRenderLinkSource linkSource;%0D%0A%0D%0A    /*public Link getLogoutLink()%0D%0A    %7B%0D%0A        Link link = linkSource.createPageRenderLink(Logout.class);%0D%0A        return link;%0D%0A    %7D*/%0D%0A%0D%0A    @Log%0D%0A    void onActivate()%0D%0A    %7B%0D%0A        Subject currentUser = securityService.getSubject();%0D%0A        principal = currentUser.getPrincipal().toString();%0D%0A        //print their identifying principal (in this case, a username):%0D%0A        LOG.debug( %22User %5B%22 + principal + %22%5D logged in successfully.%22 );%0D%0A%0D%0A    %7D%0D%0A%0D%0A    Object onActionFromLink()%0D%0A    %7B%0D%0A        securityService.getSubject().logout();%0D%0A        return  loginContextService.getLoginPage();%0D%0A    %7D%0D%0A%7D%0D%0A

add secured page