mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 01:00:44 -04:00
Added global_check_permission
This commit is contained in:
1 parent
bbd03cc337
commit
68be20459b
1 file changed
+7
@@ -31,6 +31,13 @@ module AuthHelper
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def global_check_permission(permission)
|
||||
if !global_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