From: David ‘Bombe’ Roden Date: Wed, 13 Oct 2010 11:51:20 +0000 (+0200) Subject: Only show login page if the user is not logged in. X-Git-Tag: 0.1-RC1~492 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=191965f25b39609ab8d71b833cb9d9855a91ff61;p=Sone.git Only show login page if the user is not logged in. --- 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; + } + }