Hide links when no rights, dashboard redirects to domains

This commit is contained in:
Martin Lensment 2015-01-21 10:57:52 +02:00
parent 127a4fc28e
commit a4ebb24a03
3 changed files with 13 additions and 7 deletions

View file

@ -1,5 +1,7 @@
class Admin::DashboardsController < AdminController
authorize_resource class: false
def show; end
def show
redirect_to [:admin, :domains] if can? :show, Domain
end
end