Skip to content
This repository has been archived by the owner on Nov 21, 2017. It is now read-only.

Administration

Yoz Grahame edited this page Mar 25, 2015 · 9 revisions

When developing for MyUSA, you may find it helpful to be an administrator. To enable a user as administrator, follow these steps:

  1. Log into the app server, and cd to the MyUSA Rails app directory (probably /var/www/myusa/current/ )

  2. Open a rails console. If not running in a local dev environment, you may need to specify the correct environment for the server (staging or production)

bundle exec rails console [environment]

  1. Find your user account

User.all

  1. Make the user an admin

User.find(1).grant_role!(:admin)

Questions:

  1. How do you un-make someone an admin?

User.find_by_email('joe@polastre.com').revoke_role!(:admin)

Clone this wiki locally