Commit aaeced0e authored by Zsolt Benke's avatar Zsolt Benke
Browse files

Check for user_profile

parent 6c671e1b
Pipeline #21661 failed with stage
in 41 minutes and 24 seconds
......@@ -34,9 +34,11 @@ class ApplicationController < ActionController::Base
def home
authorize :application, :home?
redirect_to volunteers_path if superadmin? || department_manager?
redirect_to clients_path if social_worker?
redirect_to profile_path(current_user) if volunteer?
if current_user.present?
redirect_to volunteers_path if superadmin? || department_manager?
redirect_to clients_path if social_worker?
redirect_to profile_path(current_user) if volunteer? && current_user.profile
end
end
def t_model
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment