hotsh/rstat.us — pull request #807 by wilkie (2014-08-06 00:32:38+00:00)
Title: Admin-roles with multiuser switch

### Adds:

* deployment instructions for heroku
* some updated gems (ostatus, ratom)
* admin page (admin is the first account created)
* toggling of new accounts by admin

People should now be able to deploy their own nodes easily and for no cost through Heroku and it should be adequate for single-account cases. MongoHQ is 512 MB for free, which is more than enough for single-account rstatus purposes.

### Acceptance Tests added:

* should create the first user account as an admin
* redirects first user to admin page after signup
* admin page is accessible by admin users
* admin page is not accessible by non-admin users
* admin page allows you to turn on multiuser setting
* admin page allows you to turn off multiuser setting
* admin page allows you to see the current multiuser setting
* must not allow user creation when there are Users and multiuser is false

### Admin model tests added:

* Admin#can_create_users? must not allow user creation when there are Users and multiuser is false
* Admin#can_create_users? must allow user creation when there are Users and multiuser is true
* Admin#can_create_users? must allow user creation when there aren't Users and multiuser is false
* Admin#can_create_users? must allow user creation when there aren't Users and multiuser is true

### User model tests added:

* User#admin must not be true as default
* User#admin? must return true when admin is true
* User#admin? must return false when admin is false

### Currently deployed at:

http://status.wilkie.io