mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
Add registrar dashboard #2713
This commit is contained in:
parent
ae29585ae2
commit
27f37b9ec4
11 changed files with 100 additions and 64 deletions
17
app/controllers/registrar/dashboard_controller.rb
Normal file
17
app/controllers/registrar/dashboard_controller.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue