From 3ad5f581d49196087d624d3ba384211fde35f6af Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 19 Jan 2010 22:44:25 +0200 Subject: [PATCH] Conditionally show the "new post" link for users with the permission to add posts. --- scribeengine/templates/base.mako | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scribeengine/templates/base.mako b/scribeengine/templates/base.mako index 4f127d2..514cbe5 100644 --- a/scribeengine/templates/base.mako +++ b/scribeengine/templates/base.mako @@ -20,10 +20,12 @@
  • ${page.name}
  • % endfor % if c.current_user: -
  • New Post
  • -
  • Logout
  • +% if c.current_user.has_permission('Add Posts'): +
  • New Post
  • +% endif +
  • Logout
  • % else: -
  • Login
  • +
  • Login
  • % endif