From 893c96a9909d0365a28c8cf4ac5fa7d4a3ec75e3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 11 Jun 2016 07:06:10 +0000 Subject: Don't skip condition if defined (#15880). git-svn-id: http://svn.redmine.org/redmine/trunk@15507 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/menu_manager.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/redmine/menu_manager.rb') diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb index 0d2d19a43..3d19edce7 100644 --- a/lib/redmine/menu_manager.rb +++ b/lib/redmine/menu_manager.rb @@ -446,8 +446,7 @@ module Redmine # it is considered an allowed node if at least one of the children is allowed all_children = children all_children += child_menus.call(project) if child_menus - return true if all_children.detect{|child| child.allowed?(user, project) } - return false + return false unless all_children.detect{|child| child.allowed?(user, project) } elsif user && project if permission unless user.allowed_to?(permission, project) -- cgit v1.2.3