diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-11 07:06:10 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-11 07:06:10 +0000 |
commit | 893c96a9909d0365a28c8cf4ac5fa7d4a3ec75e3 (patch) | |
tree | 85ac7daad92fa791a48d85d4256ed3a65d5aa55f /lib | |
parent | cec8fe4cfad241276304db40a5e592db6b08edda (diff) | |
download | redmine-893c96a9909d0365a28c8cf4ac5fa7d4a3ec75e3.tar.gz redmine-893c96a9909d0365a28c8cf4ac5fa7d4a3ec75e3.zip |
Don't skip condition if defined (#15880).
git-svn-id: http://svn.redmine.org/redmine/trunk@15507 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/menu_manager.rb | 3 |
1 files changed, 1 insertions, 2 deletions
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) |