Skip to content

Commit 0ede9ee

Browse files
committed
Bugfix: is_anonymous is an attribute in Django2.0+. Bump version
1 parent d8a4976 commit 0ede9ee

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ When the CSRF validation token doesn't match, django-admin-oauth2 will redirect
7676

7777
## Changelog
7878

79+
- 1.3.4: Bugfix: is_anonymous is now an attribute, fixes Django 2.0+
7980
- 1.3.3: Bugfix: forgot import in view
8081
- 1.3.2: Fix bug: Don't try to serialize an anonymous user
8182
- 1.3.1: Update setup.py so pypi README docs are formatted

oauthadmin/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def callback(request):
8585

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

88-
if user.is_anonymous():
88+
if user.is_anonymous:
8989
return HttpResponseRedirect(reverse(oauthadmin.views.no_permissions))
9090

9191
serialized_user = serializers.serialize("json", [user])

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
setup(
1919
name='django-admin-oauth2',
20-
version='1.3.3',
20+
version='1.3.4',
2121
description='A django app that replaces the django admin authentication mechanism by deferring to an oauth2 provider',
2222
long_description=README,
2323
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)