]> source.dussan.org Git - redmine.git/commitdiff
Don't skip condition if defined (#15880).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 11 Jun 2016 07:06:10 +0000 (07:06 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 11 Jun 2016 07:06:10 +0000 (07:06 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15507 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/menu_manager.rb

index 0d2d19a43ff27845b7ed20ba709bc43fa2bc1b28..3d19edce7f4542a093b1b741384b3e3b8fdb1a6d 100644 (file)
@@ -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)