Change restriction redirect path

This commit is contained in:
Martin Lensment 2015-03-24 17:30:52 +02:00
parent efd3e4a565
commit f5c47b8327
2 changed files with 3 additions and 2 deletions

View file

@ -12,7 +12,8 @@ class ApplicationController < ActionController::Base
end end
rescue_from CanCan::AccessDenied do |exception| rescue_from CanCan::AccessDenied do |exception|
redirect_to admin_dashboard_path, alert: exception.message redirect_to admin_root_path, alert: exception.message if current_user.is_a?(AdminUser)
redirect_to registrar_root_path, alert: exception.message if current_user.is_a?(ApiUser)
end end
def after_sign_in_path_for(_resource) def after_sign_in_path_for(_resource)

View file

@ -33,7 +33,7 @@ task :registrar do
set :domain, 'registry-st' set :domain, 'registry-st'
set :deploy_to, '$HOME/registrar' set :deploy_to, '$HOME/registrar'
set :repository, 'https://github.com/domify/registry' # dev repo set :repository, 'https://github.com/domify/registry' # dev repo
set :branch, 'registrar-portal' set :branch, 'master'
set :rails_env, 'alpha' set :rails_env, 'alpha'
set :delayed_job, false set :delayed_job, false
end end