I think you know this place: https://github.com/gregbell/active_admin/issues/501 , some good ideas about dashboards there.
Partialize something like this in the dashboards.rb file:
ActiveAdmin::Dashboards.build do section 'Common', :priority => 1 do div do render 'common_dashboard' end end ... end
Then from the partial that you have to create in app / views / admin / dashboard / _common_dashboard.html.erb, you can access the current_admin_user object:
<ul> <li><%= current_admin_user.role %></li> </ul>
Another way to access current_admin_user from dashboards.rb '' 'environment' '' is to use the arbre syntax and formulate sections of your panel, for example
section "Common",:priority => 1 do div do if current_admin_user.role == "customer" li "You are a customer" end end '' end
source share