Only show “create Sone” in menu when not logged in.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Oct 2010 07:22:56 +0000 (09:22 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Oct 2010 07:22:56 +0000 (09:22 +0200)
src/main/java/net/pterodactylus/sone/web/CreateSonePage.java

index f15fe04..0174b76 100644 (file)
@@ -95,7 +95,7 @@ public class CreateSonePage extends SoneTemplatePage {
         */
        @Override
        public boolean isEnabled(ToadletContext toadletContext) {
-               return true;
+               return getCurrentSone(toadletContext) == null;
        }
 
 }