diff options
author | Dan McGee <dan@archlinux.org> | 2013-02-03 13:55:25 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-02-03 13:56:35 -0600 |
commit | 9da8a63dd476fe3607a68a028655c9f9d0fee163 (patch) | |
tree | 6d16436917a3231845974171c3e06816feaad1c1 /devel/admin.py | |
parent | 844ed8109317db882e5d2b2ae8fa6084f794d798 (diff) |
Add DeveloperKey model
We're starting to see developers use subkeys of their primary key to
sign packages, which we aren't handling well in the web interface. These
subkeys show up as unknown, which isn't strictly true. Start the process
of being able to handle these keys by adding a model that will store all
known keys and subkeys and the relationships among them, as well as
which developer owns each.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/admin.py')
-rw-r--r-- | devel/admin.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/devel/admin.py b/devel/admin.py index 5a704c0b..971933b7 100644 --- a/devel/admin.py +++ b/devel/admin.py @@ -2,7 +2,7 @@ from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User -from .models import UserProfile, MasterKey, PGPSignature +from .models import UserProfile, MasterKey, DeveloperKey, PGPSignature class UserProfileInline(admin.StackedInline): @@ -17,7 +17,14 @@ class UserProfileAdmin(UserAdmin): class MasterKeyAdmin(admin.ModelAdmin): list_display = ('pgp_key', 'owner', 'created', 'revoker', 'revoked') - search_fields = ('pgp_key', 'owner', 'revoker') + search_fields = ('pgp_key', 'owner__username', 'revoker__username') + date_hierarchy = 'created' + + +class DeveloperKeyAdmin(admin.ModelAdmin): + list_display = ('key', 'parent', 'owner', 'created', 'expires', 'revoked') + search_fields = ('key', 'owner__username') + list_filter = ('owner',) date_hierarchy = 'created' @@ -32,6 +39,7 @@ admin.site.unregister(User) admin.site.register(User, UserProfileAdmin) admin.site.register(MasterKey, MasterKeyAdmin) +admin.site.register(DeveloperKey, DeveloperKeyAdmin) admin.site.register(PGPSignature, PGPSignatureAdmin) # vim: set ts=4 sw=4 et: |