Merge lp:~canonical-isd-hackers/canonical-identity-provider/finish-yubi-rename into lp:~canonical-isd-hackers/canonical-identity-provider/add-yubikey-support

Proposed by David Owen
Status: Merged
Approved by: Łukasz Czyżykowski
Approved revision: no longer in the source branch.
Merged at revision: 167
Proposed branch: lp:~canonical-isd-hackers/canonical-identity-provider/finish-yubi-rename
Merge into: lp:~canonical-isd-hackers/canonical-identity-provider/add-yubikey-support
Diff against target: 43 lines (+4/-4)
2 files modified
identityprovider/forms.py (+1/-1)
identityprovider/views/account.py (+3/-3)
To merge this branch: bzr merge lp:~canonical-isd-hackers/canonical-identity-provider/finish-yubi-rename
Reviewer Review Type Date Requested Status
Łukasz Czyżykowski Pending
Review via email: mp+60884@code.launchpad.net

Commit message

Finishes the YubiKey->UserYubiKey model rename

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'identityprovider/forms.py'
2--- identityprovider/forms.py 2011-05-12 15:08:08 +0000
3+++ identityprovider/forms.py 2011-05-13 10:10:11 +0000
4@@ -97,7 +97,7 @@
5
6 account = Account.objects.get_by_email(email)
7 try:
8- account.yubikey_set.get(pk=otp[:12])
9+ account.useryubikey_set.get(pk=otp[:12])
10 except UserYubiKey.DoesNotExist:
11 raise forms.ValidationError(_("This key is not valid for "
12 "this account"))
13
14=== modified file 'identityprovider/views/account.py'
15--- identityprovider/views/account.py 2011-05-12 15:08:08 +0000
16+++ identityprovider/views/account.py 2011-05-13 10:10:11 +0000
17@@ -79,7 +79,7 @@
18 'message': request.session.pop('message', None),
19 'message_style': 'informational',
20 'token': token,
21- 'has_keys': bool(account.yubikey_set.count()),
22+ 'has_keys': bool(account.useryubikey_set.count()),
23 })
24 return render_to_response('account/edit.html', context)
25
26@@ -109,7 +109,7 @@
27 'current_section': 'emails',
28 'account': account,
29 'account_displayname': account.displayname,
30- 'yubi_keys': account.yubikey_set.all(),
31+ 'yubi_keys': account.useryubikey_set.all(),
32 'form': form,
33 'message': request.session.pop('message', None),
34 'message_style': 'informational'
35@@ -246,7 +246,7 @@
36
37 @login_required
38 def delete_key(request, public_id):
39- key = get_object_or_404(request.user.yubikey_set, public_id=public_id)
40+ key = get_object_or_404(request.user.useryubikey_set, public_id=public_id)
41 if request.method == 'POST':
42 account = key.account
43 key.delete()

Subscribers

People subscribed via source and target branches

to all changes: