Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-openid-auth
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-openid-auth
Commits
2af85d40
Commit
2af85d40
authored
Aug 23, 2011
by
Michael Hall
Browse files
Options
Browse Files
Download
Plain Diff
Merge from prerequisite branch
parents
f767f79e
ee6c5a83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
django_openid_auth/auth.py
+3
-1
django_openid_auth/tests/test_views.py
+4
-1
No files found.
django_openid_auth/auth.py
View file @
2af85d40
...
...
@@ -187,7 +187,9 @@ class OpenIDBackend:
if
getattr
(
settings
,
'OPENID_STRICT_USERNAMES'
,
False
):
if
User
.
objects
.
filter
(
username__exact
=
nickname
)
.
count
()
>
0
:
raise
DuplicateUsernameViolation
(
"Duplicate username:
%
s"
%
nickname
)
raise
DuplicateUsernameViolation
(
"The username (
%
s) with which you tried to log in is "
"already in use for a different account."
%
nickname
)
# Pick a username for the user based on their nickname,
# checking for conflicts.
...
...
django_openid_auth/tests/test_views.py
View file @
2af85d40
...
...
@@ -836,7 +836,10 @@ class RelyingPartyTests(TestCase):
# Status code should be 403: Forbidden
self
.
assertEquals
(
403
,
response
.
status_code
)
self
.
assertContains
(
response
,
'<h1>OpenID failed</h1>'
,
status_code
=
403
)
self
.
assertContains
(
response
,
'<p>Duplicate username: someuser</p>'
,
status_code
=
403
)
self
.
assertContains
(
response
,
"The username (someuser) with which you tried to log in is "
"already in use for a different account."
,
status_code
=
403
)
status_code
=
403
)
def
test_strict_username_duplicate_user_override
(
self
):
settings
.
OPENID_CREATE_USERS
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment