Renamed check_global_rights to check_global_access.
This commit is contained in:
parent
bb4343d6ce
commit
8d9f63ae39
|
@ -7,10 +7,14 @@ class ActionController::Base
|
|||
current_user.can_perform? c, a, target
|
||||
end
|
||||
|
||||
def check_global_rights
|
||||
def check_global_access
|
||||
unless can_perform?
|
||||
flash[:notice] = t('layout.not_access')
|
||||
if request.env['HTTP_REFERER']
|
||||
redirect_to(:back)
|
||||
else
|
||||
redirect_to(:root)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue