aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-05-02 21:41:44 +0300
committerGravatar Vitaly Takmazov2017-05-05 12:07:17 +0300
commitdc3f40eab5b9ab848964a1ff262227b8b61c9e61 (patch)
tree1badaecd6ac7e7a2f20bb914ab9a3a4c74e7d83a /juick-www/src/main/java/com/juick
parent045ca0848c8ee7c771541a5829157531c782cf30 (diff)
juick-www: Pebble's strictVariables
Diffstat (limited to 'juick-www/src/main/java/com/juick')
-rw-r--r--juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java1
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/Home.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java b/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
index 877c94ac..944fbb80 100644
--- a/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
+++ b/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
@@ -85,6 +85,7 @@ public class WwwServletConfiguration extends WebMvcConfigurationSupport {
return new PebbleEngine.Builder()
.loader(this.templateLoader())
.extension(springExtension())
+ .strictVariables(true)
.build();
}
diff --git a/juick-www/src/main/java/com/juick/www/controllers/Home.java b/juick-www/src/main/java/com/juick/www/controllers/Home.java
index a36d0d09..cde9e635 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/Home.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/Home.java
@@ -189,6 +189,7 @@ public class Home {
String links = sape.getPageLinks(requestURI, sapeCookie).render();
model.addAttribute("links", links);
}
+ model.addAttribute("isModerator", visitor.getUid() == 3694);
return "views/index";
}
}