diff options
author | Dan McGee <dan@archlinux.org> | 2012-08-01 01:37:30 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-08-01 01:37:30 +0200 |
commit | 3f0c024754047d92e8ce4aa4ecf93a06865f8448 (patch) | |
tree | 89b27b1986de6d2a72ac8a1a7a05d56442b15bda /main | |
parent | 4ad43fd8165834b26914ff8ba0666ce96267205b (diff) | |
download | archweb-3f0c024754047d92e8ce4aa4ecf93a06865f8448.tar.gz archweb-3f0c024754047d92e8ce4aa4ecf93a06865f8448.tar.xz |
PGP key handling updates
* Import signatures for all known keys, not just active developers
* Ensure we are only showing and accounting for active developers on the
master keys page
* Add a new table showing signatures between developers
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main')
-rw-r--r-- | main/templatetags/pgp.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/main/templatetags/pgp.py b/main/templatetags/pgp.py index 50b1aa1..5c9fe51 100644 --- a/main/templatetags/pgp.py +++ b/main/templatetags/pgp.py @@ -39,6 +39,14 @@ def pgp_key_link(key_id, link_text=None): values = (url, format_key(key_id), link_text) return '<a href="%s" title="PGP key search for %s">%s</a>' % values +@register.simple_tag +def user_pgp_key_link(users, key_id): + matched = [user for user in users if user.userprofile.pgp_key and + user.userprofile.pgp_key[-16:] == key_id[-16:]] + if matched and len(matched) == 1: + return pgp_key_link(key_id, matched[0].get_full_name()) + return pgp_key_link(key_id) + @register.filter def pgp_fingerprint(key_id, autoescape=True): if not key_id: |