28 lines
529 B
Ruby
28 lines
529 B
Ruby
# frozen_string_literal: true
|
|
module Admin
|
|
class DashboardController < AdminController
|
|
def show
|
|
authorize :dashboard
|
|
send "redirect_for_#{current_user.role}"
|
|
end
|
|
|
|
private
|
|
|
|
def redirect_for_admin
|
|
redirect_to admin_users_url
|
|
end
|
|
|
|
def redirect_for_manager
|
|
redirect_to admin_quizzes_url
|
|
end
|
|
|
|
def redirect_for_reviewer
|
|
redirect_to admin_results_url
|
|
end
|
|
|
|
def redirect_for_recruiter
|
|
redirect_to admin_candidates_url
|
|
end
|
|
end
|
|
end
|