Skip to content

Commit

Permalink
Bugfix: is_anonymous is an attribute in Django2.0+. Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin1024 committed Jul 16, 2024
1 parent d8a4976 commit 0ede9ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ When the CSRF validation token doesn't match, django-admin-oauth2 will redirect

## Changelog

- 1.3.4: Bugfix: is_anonymous is now an attribute, fixes Django 2.0+
- 1.3.3: Bugfix: forgot import in view
- 1.3.2: Fix bug: Don't try to serialize an anonymous user
- 1.3.1: Update setup.py so pypi README docs are formatted
Expand Down
2 changes: 1 addition & 1 deletion oauthadmin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def callback(request):

user = import_by_path(app_setting('GET_USER'))(token)

if user.is_anonymous():
if user.is_anonymous:
return HttpResponseRedirect(reverse(oauthadmin.views.no_permissions))

serialized_user = serializers.serialize("json", [user])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setup(
name='django-admin-oauth2',
version='1.3.3',
version='1.3.4',
description='A django app that replaces the django admin authentication mechanism by deferring to an oauth2 provider',
long_description=README,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 0ede9ee

Please sign in to comment.