diff options
author | Vitaly Takmazov | 2017-05-02 21:41:44 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-05-05 12:07:17 +0300 |
commit | dc3f40eab5b9ab848964a1ff262227b8b61c9e61 (patch) | |
tree | 1badaecd6ac7e7a2f20bb914ab9a3a4c74e7d83a /juick-www/src/main/java/com/juick/www | |
parent | 045ca0848c8ee7c771541a5829157531c782cf30 (diff) |
juick-www: Pebble's strictVariables
Diffstat (limited to 'juick-www/src/main/java/com/juick/www')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java | 1 | ||||
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/Home.java | 1 |
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"; } } |