Added role base redirect and updated abilities

This commit is contained in:
Priit Tark 2015-05-20 20:58:57 +03:00
parent 5afa0ac793
commit 84cd0b8378
5 changed files with 34 additions and 24 deletions

View file

@ -16,7 +16,7 @@ class RegistrarController < ApplicationController
sign_out(current_user)
return
end
return if Rails.env.development?
return if current_user.registrar.registrar_ip_white?(request.ip)
flash[:alert] = t('ip_is_not_whitelisted')
sign_out(current_user)