Skip to content

Give tenant user admin role

Bill Branan edited this page Jun 9, 2017 · 2 revisions

To give an existing user in a tenant admin role:

Setup

  1. SSH to the webapp instance in the stack, see instructions here
  2. Open a rails console, see instructions here

Add admin role

  1. Switch into the tenant: AccountElevator.switch!('tenant.host.name.here')
  2. Grab the user instance: user = User.find_by(email: '[email protected]')
  3. Add the role for the current site instance: user.add_role(:admin, Site.instance)