Question

Goal: I want to create a separate Rails Admin Interface for a Super Admin to manage Admins.

Current Situation: I currently have my normal Rails Admin setup where an Admin logs in to create stuff.

Situation I'm going for: I want a single user that is called Super Admin who can manage the Admins that can create stuff. This Super Admin would have the option to:

  • Create
  • Remove
  • Edit

any Admin users

Was it helpful?

Solution 2

I'm going to answer my own question and my own Situation.

What did I do: -> Added column "user_admin" to my User Model -> Since I'm using cancan I can manage my admin users from Ability, more information is found here: https://github.com/sferik/rails_admin/wiki/Cancan

When a user is an admin_user he can manage everything but when I login with my SuperAdmin I can manage all + User model

OTHER TIPS

Just have another controller and views then check whether the current admin is a super admin and if not redirect them away.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top