mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 02:09:39 +02:00
17 lines
475 B
Ruby
17 lines
475 B
Ruby
class Registrar::DashboardController < RegistrarController
|
|
authorize_resource class: false
|
|
|
|
def show
|
|
if can?(:show, :poll)
|
|
redirect_to registrar_poll_url and return
|
|
elsif can?(:show, Invoice)
|
|
redirect_to registrar_invoices_url and return
|
|
end
|
|
|
|
# if current_user.try(:roles) == ['billing']
|
|
# redirect_to registrar_invoices_url and return
|
|
# elsif can?(:show, :poll)
|
|
# redirect_to registrar_poll_url and return
|
|
# end
|
|
end
|
|
end
|