summaryrefslogtreecommitdiff
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-03-29 17:49:20 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-03-29 17:49:20 +0200
commita3762dc8398f83e0112b7833a6259d2c041617db (patch)
tree05c1b82a48ce7b486e7d1538a31349b2f7ec8661 /src/main/java/eu
parent85b5e266cbed1093e1440ee0ac50087697a96108 (diff)
Show bookmark and lazy chat submission forms if and only if logged in.
With the recent session cookie fix, this now works as it should and can therefore be enabled. Change-Id: I96cfdcd99952e7f91ae468de80d6445a024c74b5
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java6
-rw-r--r--src/main/java/eu/mulk/mulkcms2/benki/lazychat/LazychatResource.java4
2 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java b/src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java
index df1fd55..485a96e 100644
--- a/src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java
+++ b/src/main/java/eu/mulk/mulkcms2/benki/bookmarks/BookmarkResource.java
@@ -108,9 +108,8 @@ public class BookmarkResource {
.data("posts", q.posts)
.data("feedUri", "/bookmarks/feed")
.data("pageTitle", "Bookmarks")
- .data("showBookmarkForm", false)
+ .data("showBookmarkForm", !identity.isAnonymous())
.data("showLazychatForm", false)
- .data("authenticated", !identity.isAnonymous())
.data("hasPreviousPage", q.prevCursor != null)
.data("hasNextPage", q.nextCursor != null)
.data("previousCursor", q.prevCursor)
@@ -136,9 +135,8 @@ public class BookmarkResource {
.data("posts", q.posts)
.data("feedUri", String.format("/bookmarks/~%s/feed", ownerName))
.data("pageTitle", "Bookmarks")
- .data("showBookmarkForm", false)
+ .data("showBookmarkForm", !identity.isAnonymous())
.data("showLazychatForm", false)
- .data("authenticated", !identity.isAnonymous())
.data("hasPreviousPage", q.prevCursor != null)
.data("hasNextPage", q.nextCursor != null)
.data("previousCursor", q.prevCursor)
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/lazychat/LazychatResource.java b/src/main/java/eu/mulk/mulkcms2/benki/lazychat/LazychatResource.java
index 173fb10..a74692b 100644
--- a/src/main/java/eu/mulk/mulkcms2/benki/lazychat/LazychatResource.java
+++ b/src/main/java/eu/mulk/mulkcms2/benki/lazychat/LazychatResource.java
@@ -76,7 +76,7 @@ public class LazychatResource {
.data("posts", q.posts)
.data("pageTitle", "Lazy Chat")
.data("showBookmarkForm", false)
- .data("showLazychatForm", true)
+ .data("showLazychatForm", !identity.isAnonymous())
.data("hasPreviousPage", q.prevCursor != null)
.data("hasNextPage", q.nextCursor != null)
.data("previousCursor", q.prevCursor)
@@ -102,7 +102,7 @@ public class LazychatResource {
.data("posts", q.posts)
.data("pageTitle", "Lazy Chat")
.data("showBookmarkForm", false)
- .data("showLazychatForm", true)
+ .data("showLazychatForm", !identity.isAnonymous())
.data("hasPreviousPage", q.prevCursor != null)
.data("hasNextPage", q.nextCursor != null)
.data("previousCursor", q.prevCursor)