Automatic superusers via Active Collab for django
by jaymz on 21/02/2011Two things I use a lot at work – Django and Active Collab. One is the python framework we build everything on and the other is a project management tool that we use – think a local install of Basecamp roughly.
It can get annoying when we create development versions of things we’re working on and have to go and create test users for people; so I thought since writing an auth backend for django is so easy why not just use that to allow any user with a valid Active Collab account to login to the dev admin.
The code is on github and will automatically create a superuser in django’s auth table. Users can then login with their active collab emails & passwords without having to pass around test accounts. It also means users wont suddenly lose access when you nuke the database for imports saving you some earache. Just add your base active collab url to the AC_URL variable in settings.py and add ‘acollabauth.backends.ActiveCollabBackend‘ to your AUTHENTICATION_BACKENDS tuple.
I have also blogged about this over at udox.
jaymzcd@googlemail.com
Comments are closed.