From 191965f25b39609ab8d71b833cb9d9855a91ff61 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 13 Oct 2010 13:51:20 +0200 Subject: [PATCH] Only show login page if the user is not logged in. --- src/main/java/net/pterodactylus/sone/web/LoginPage.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/web/LoginPage.java b/src/main/java/net/pterodactylus/sone/web/LoginPage.java index 4965bbf..e5ef128 100644 --- a/src/main/java/net/pterodactylus/sone/web/LoginPage.java +++ b/src/main/java/net/pterodactylus/sone/web/LoginPage.java @@ -78,4 +78,12 @@ public class LoginPage extends SoneTemplatePage { return null; } + /** + * {@inheritDoc} + */ + @Override + public boolean isEnabled(ToadletContext toadletContext) { + return getCurrentSone(toadletContext) == null; + } + } -- 2.7.4