From: David ‘Bombe’ Roden Date: Tue, 25 Jan 2011 08:13:55 +0000 (+0100) Subject: Show the “create Sone” page in the menu if we’re auto-logged in. X-Git-Tag: 0.4.2^2~3 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=d8267f8b65fec44c17a1f0c1223fbf8fd2ff3fb7 Show the “create Sone” page in the menu if we’re auto-logged in. --- diff --git a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java index c33974b..cc40320 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java @@ -129,7 +129,7 @@ public class CreateSonePage extends SoneTemplatePage { */ @Override public boolean isEnabled(ToadletContext toadletContext) { - return getCurrentSone(toadletContext, false) == null; + return (getCurrentSone(toadletContext, false) == null) || (webInterface.getCore().getLocalSones().size() == 1); } }