mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Refactored proposal. Enabled cancancan
This commit is contained in:
parent
0ae7991943
commit
c982cbb88a
13 changed files with 204 additions and 231 deletions
|
|
@ -64,10 +64,6 @@ class ApplicationController < ActionController::Base
|
|||
redirect_to root_path unless has_role?(current_user, 'admin')
|
||||
end
|
||||
|
||||
def current_ability
|
||||
@current_ability ||= AdminAbility.new(current_user)
|
||||
end
|
||||
|
||||
rescue_from CanCan::AccessDenied do |exception|
|
||||
Rails.logger.debug("Access denied!")
|
||||
redirect_to root_path, alert: exception.message
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue