From: David ‘Bombe’ Roden Date: Thu, 14 Oct 2010 07:22:56 +0000 (+0200) Subject: Only show “create Sone” in menu when not logged in. X-Git-Tag: 0.1-RC1~427 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=053ddb3ed40d5189f8c34c9b5260be8e49e37138;p=Sone.git Only show “create Sone” in menu when not 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 f15fe04..0174b76 100644 --- a/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/CreateSonePage.java @@ -95,7 +95,7 @@ public class CreateSonePage extends SoneTemplatePage { */ @Override public boolean isEnabled(ToadletContext toadletContext) { - return true; + return getCurrentSone(toadletContext) == null; } }