mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Don't skip condition if defined (#15880).
git-svn-id: http://svn.redmine.org/redmine/trunk@15507 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cec8fe4cfa
commit
893c96a990
@ -446,8 +446,7 @@ module Redmine
|
|||||||
# it is considered an allowed node if at least one of the children is allowed
|
# it is considered an allowed node if at least one of the children is allowed
|
||||||
all_children = children
|
all_children = children
|
||||||
all_children += child_menus.call(project) if child_menus
|
all_children += child_menus.call(project) if child_menus
|
||||||
return true if all_children.detect{|child| child.allowed?(user, project) }
|
return false unless all_children.detect{|child| child.allowed?(user, project) }
|
||||||
return false
|
|
||||||
elsif user && project
|
elsif user && project
|
||||||
if permission
|
if permission
|
||||||
unless user.allowed_to?(permission, project)
|
unless user.allowed_to?(permission, project)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user