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

有帮助吗?

解决方案 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

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top