Show User Logged in rails_admin dashboard

0

Good afternoon everyone, I am developing a project in rails 5 using devise, cancancan and rails_admin, what happens is the following, I created some types of users, among them I mention admin users (has full manager permission on cancancan), and Users who have some restrictions, the question is that every admin user I create, right after authentication, already in the main dashboard of rails_admin is correctly shown the name of the authenticated user, but ordinary users who do not have manage permission in the cancancan, not appears.

Thanks for any help.ob

    
asked by anonymous 06.10.2017 / 18:23

1 answer

1

If someone goes through this, I made the following adjustment, I created the line as below, so the user can manage to be login.

PS. Adjustment was done on the ability (cancancan)

def initialize(user)
  if user
    if user.kind == 'salesman'
      can :manage, User, id: user.id
end
    
10.10.2017 / 20:44