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
120b239c
Commit
120b239c
authored
Dec 02, 2011
by
Kevin McDermott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change to an assert following a chat with James.
parent
ef0a28fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
13 deletions
+1
-13
django_openid_auth/admin.py
+1
-2
django_openid_auth/tests/test_admin.py
+0
-11
No files found.
django_openid_auth/admin.py
View file @
120b239c
...
...
@@ -79,8 +79,7 @@ if getattr(settings, 'OPENID_USE_AS_ADMIN_LOGIN', False):
return
views
.
default_render_failure
(
request
,
"User
%
s does not have admin access."
%
request
.
user
.
username
)
return
views
.
render_failure
(
request
,
"Unknown Error:
%
s"
%
error_message
)
assert
"Unknown Error:
%
s"
%
error_message
else
:
# Redirect to openid login path,
return
HttpResponseRedirect
(
...
...
django_openid_auth/tests/test_admin.py
View file @
120b239c
...
...
@@ -73,17 +73,6 @@ class SiteAdminTests(TestCase):
self
.
assertTrue
(
'User testing does not have admin access.'
in
response
.
content
,
'Missing error message in response'
)
def
dont_admin_site_with_openid_login_authenticated_and_staff
(
self
):
"""
If the request has an authenticated user, who is flagged as a
staff member, then they get a error response.
"""
create_user
(
is_staff
=
True
)
self
.
client
.
login
(
username
=
'testing'
,
password
=
'test'
)
response
=
self
.
client
.
get
(
'/admin/'
)
self
.
assertTrue
(
'Unknown Error: '
in
response
.
content
,
'Missing error message in response'
)
def
test_admin_site_with_openid_login_non_authenticated_user
(
self
):
"""
Unauthenticated users accessing the admin page should be directed to
...
...
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