mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54:23 -05:00
added check_permission
This commit is contained in:
@@ -25,6 +25,12 @@ module AuthHelper
|
||||
false
|
||||
end
|
||||
|
||||
def check_permission(permission)
|
||||
if !allowed_to?(permission)
|
||||
render :file => "public/401.html.erb", :status => :unauthorized, :layout =>true
|
||||
end
|
||||
end
|
||||
|
||||
def global_allowed_to?( action)
|
||||
return false if User.current.nil?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user