mysociety/popit — pull request #589 by hecticjeff (2014-08-01 16:01:39+00:00)
Title: Site-wide accounts and multiple users per instance

This is a rather large pull request to switch to using site-wide popit accounts, rather than per-instance ones. It also adds the ability to invite others to collaborate on your instance.

### Highlights

- Switched from custom auth solution to [PassportJS](http://passportjs.org/)
- Changed user accounts to be site-wide rather than per-instance
- Added role based authorisation using [connect-roles](https://github.com/ForbesLindesay/connect-roles)
- Upgrade process for transitioning users to the new site-wide accounts
- Added the ability to have multiple users editing a single PopIt using **owner** and **editor** roles.
- There is now a proper password reset process
- Legacy basic auth still works for now, but uses PassportJS internally
- There are now *some* integration tests for the auth process

Since it's such a big pull request here are the pieces that make up the whole:

- https://github.com/mysociety/popit/compare/b21e6965ad6e7e7b96339f89aa97d69c79bb229c...4ecfbe8c8ac1796100b9d309c9eb46d5cc35b137 - Switching to site-wide authentication using passport.
- https://github.com/mysociety/popit/compare/4ecfbe8c8ac1796100b9d309c9eb46d5cc35b137...549d4b031a78306f82fd66f08aa322725ecd996d - New instance creation process and other misc fixes
- https://github.com/mysociety/popit/compare/549d4b031a78306f82fd66f08aa322725ecd996d...f85d7d7434098220ae6992666ac2ab15ec1b0b77 - User management pages design and implementation. Switched to role based permissions.
- https://github.com/mysociety/popit/compare/f85d7d7434098220ae6992666ac2ab15ec1b0b77...e631b2e9d3ea1c689b46ec8bd9630c91e7c47f1c - Upgrade account screen designs
- https://github.com/mysociety/popit/compare/e631b2e9d3ea1c689b46ec8bd9630c91e7c47f1c...8112af91acdaba5842be210a765c59ddcf0ae117 - Topbar with user details and login/out link
- https://github.com/mysociety/popit/compare/8112af91acdaba5842be210a765c59ddcf0ae117...3ddefd5a3c052547c278a51a85ba9b3ae939f137 - User management invites for new users and registration screen
- https://github.com/mysociety/popit/compare/3ddefd5a3c052547c278a51a85ba9b3ae939f137...afa8298e7e019d31461e15c2e51075c15d70ef3c - Password reset screen
- https://github.com/mysociety/popit/compare/afa8298e7e019d31461e15c2e51075c15d70ef3c...ecfa7ce532dbd33c255129a1bb5097f3d56cb6c4 - List of instances owned by the current user
- https://github.com/mysociety/popit/compare/ecfa7ce532dbd33c255129a1bb5097f3d56cb6c4...57508b759f26e62e6c1b799b01a3a59f83d40b93 - Miscellaneous fixes to the user accounts and multi-user work

Fixes https://github.com/mysociety/popit/issues/17
Fixes https://github.com/mysociety/popit/issues/102
Fixes https://github.com/mysociety/popit/issues/395
Fixes https://github.com/mysociety/popit/issues/509
Fixes https://github.com/mysociety/popit/issues/510
Fixes https://github.com/mysociety/popit/issues/511
Fixes https://github.com/mysociety/popit/issues/572
Fixes https://github.com/mysociety/popit/issues/573
Fixes https://github.com/mysociety/popit/issues/581
Fixes https://github.com/mysociety/popit/issues/585