drewww/unhangout — pull request #232 by yourcelf (2013-11-20 04:15:29+00:00)
Title: Superuser admin

This is an initial implementation of a distinction between superusers and admins, with admins being in charge of particular events. Major changes:

- What 'admin' meant in the past now uses the language 'superuser',
including in ``conf.json`` -- so configurations need to be updated.
``UNHANGOUT_ADMIN_EMAILS`` has changed to ``UNHANGOUT_SUPERUSER_EMAILS``.
Superusers have permission to every event.
- A new "Users" tab which is visible only to superusers allows
granting superuser and admin status for particular users and events.
- Admins viewing the route `/admin/` will only see the events/sessions
they are allowed to.

What's missing:

- The link to `Admin` doesn't show up on the home page for admins --
it only shows up on pages where there is a ``curEvent`` parameter set.
Since admin-ship is a property of Event models, it requires
enumerating every Event to see if they should see an admin link.
(Insert discussion about relational DB's vs key-value stores here. :))
- There is no way to set the adminship from a the event admin pages.
Admin-ness is only settable at ``/admin/users/``, and only by
superusers. Should be easy to fix, just need to write the UI.
- No selenium tests for ``/admin/users/`` frontend yet, though the
backend POSTable plumbing is thoroughly covered.