From 0c38ffc915e33267d18d337cf744d6aa8b6bad10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Tue, 5 Aug 2014 10:28:49 +0200 Subject: [PATCH] Adding permissions verification to draw the main menu --- app/coffee/modules/nav.coffee | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/coffee/modules/nav.coffee b/app/coffee/modules/nav.coffee index da342c69..d8961738 100644 --- a/app/coffee/modules/nav.coffee +++ b/app/coffee/modules/nav.coffee @@ -105,7 +105,7 @@ ProjectMenuDirective = ($log, $compile, $auth, $rootscope, $tgAuth, $location) - Search - <% if (project.is_backlog_activated) { %> + <% if (project.is_backlog_activated && project.my_permissions.indexOf("view_us") != -1) { %> <% } %> - <% if (project.is_kanban_activated) { %> + <% if (project.is_kanban_activated && project.my_permissions.indexOf("view_us") != -1) { %> <% } %> - <% if (project.is_issues_activated) { %> + <% if (project.is_issues_activated && project.my_permissions.indexOf("view_issues") != -1) { %> <% } %> - <% if (project.is_wiki_activated) { %> + <% if (project.is_wiki_activated && project.my_permissions.indexOf("view_wiki_pages") != -1) { %> <% } %> + <% if (project.i_am_owner) { %> + <% } %>