mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Update auth_helper.rb
This commit is contained in:
@@ -17,13 +17,16 @@ module AuthHelper
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def permission_checker(permission_list)
|
def global_allowed_to?(user, action)
|
||||||
proc {
|
return false if user.nil?
|
||||||
flag = false
|
|
||||||
permission_list.each { |permission|
|
projects = Project.all
|
||||||
flag ||= User.current.allowed_to_globally?(permission, {})
|
projects.each { |p|
|
||||||
}
|
if user.allowed_to?(action, p)
|
||||||
flag
|
return true
|
||||||
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user