Merge lp:~canonical-isd-hackers/canonical-identity-provider/deprecated-auth into lp:canonical-identity-provider/release

Proposed by David Owen
Status: Merged
Approved by: David Owen
Approved revision: no longer in the source branch.
Merged at revision: 251
Proposed branch: lp:~canonical-isd-hackers/canonical-identity-provider/deprecated-auth
Merge into: lp:canonical-identity-provider/release
Prerequisite: lp:~canonical-isd-hackers/canonical-identity-provider/deprecated-messages
Diff against target: 16 lines (+6/-0)
1 file modified
identityprovider/auth.py (+6/-0)
To merge this branch: bzr merge lp:~canonical-isd-hackers/canonical-identity-provider/deprecated-auth
Reviewer Review Type Date Requested Status
Canonical ISD hackers Pending
Review via email: mp+86434@code.launchpad.net

Commit message

Updated for Django's new auth interface (defaults work in 1.3, but will invert meaning in 1.4 and break things)

Description of the change

In Django 1.2 & 1.3, the default behavior is to assume False when these two methods don't exist. This emulates <1.2's behavior of not supporting these features at all. In 1.4, the default will invert.

To post a comment you must log in.
Revision history for this message
ISD Branch Mangler (isd-branches-mangler) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'identityprovider/auth.py'
2--- identityprovider/auth.py 2011-10-07 21:06:52 +0000
3+++ identityprovider/auth.py 2011-12-20 17:08:32 +0000
4@@ -64,6 +64,12 @@
5 User object. """
6 return get_object_or_none(Account.objects.select_related(), pk=user_id)
7
8+ def supports_anonymous_user(self):
9+ return False
10+
11+ def supports_object_permissions(self):
12+ return False
13+
14
15 def basic_authenticate(username, password):
16 """Function used by lazr.authentication middleware"""