Refactored proposal. Enabled cancancan

This commit is contained in:
Henne Vogelsang 2014-07-17 16:57:17 +02:00
parent 64e191f60e
commit de64500003
13 changed files with 204 additions and 231 deletions

View file

@ -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