diff options
author | Dan McGee <dan@archlinux.org> | 2012-07-31 18:37:30 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-07-31 18:37:30 -0500 |
commit | 3f0c024754047d92e8ce4aa4ecf93a06865f8448 (patch) | |
tree | 89b27b1986de6d2a72ac8a1a7a05d56442b15bda /main | |
parent | 4ad43fd8165834b26914ff8ba0666ce96267205b (diff) |
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 50b1aa17..5c9fe511 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: |