Only show login page if the user is not logged in.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Oct 2010 11:51:20 +0000 (13:51 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Oct 2010 11:51:20 +0000 (13:51 +0200)
src/main/java/net/pterodactylus/sone/web/LoginPage.java

index 4965bbf..e5ef128 100644 (file)
@@ -78,4 +78,12 @@ public class LoginPage extends SoneTemplatePage {
                return null;
        }
 
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       public boolean isEnabled(ToadletContext toadletContext) {
+               return getCurrentSone(toadletContext) == null;
+       }
+
 }