From 731229b1326c8e870d340dfdd64175148df23c56 Mon Sep 17 00:00:00 2001 From: zalun Date: Sat, 6 Feb 2010 14:53:57 +0000 Subject: [PATCH] authentication support for staff --- flightdeck/amo/authentication.py | 6 ++++++ flightdeck/person/admin.py | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 flightdeck/person/admin.py diff --git a/flightdeck/amo/authentication.py b/flightdeck/amo/authentication.py index 88721b47..3d7d46b2 100644 --- a/flightdeck/amo/authentication.py +++ b/flightdeck/amo/authentication.py @@ -59,3 +59,9 @@ class AMOAuthentication: profile.save() return user + + def get_user(self, user_id): + try: + return User.objects.get(pk=user_id) + except: + return None diff --git a/flightdeck/person/admin.py b/flightdeck/person/admin.py new file mode 100644 index 00000000..f828cd1f --- /dev/null +++ b/flightdeck/person/admin.py @@ -0,0 +1,7 @@ +from django.contrib import admin + +from models import Profile + +class ProfileAdmin(admin.ModelAdmin): + pass +admin.site.register(Profile, ProfileAdmin)