Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use user.is_authenticated method if possible #254

Closed
wants to merge 5 commits into from

Conversation

bbayles
Copy link
Contributor

@bbayles bbayles commented Oct 12, 2017

This PR changes axes.decorators.check_request such that it uses the User.is_authenticated method when running under Django 1.10 and above.

The callable is_authenticated() method was deprecated in Django 1.10 - see the notice here. This PR prevents this warning from showing up:

RemovedInDjango20Warning: Using user.is_authenticated() and user.is_anonymous() as a method is deprecated. Remove the parentheses to use it as an attribute.

@coveralls
Copy link

coveralls commented Oct 12, 2017

Coverage Status

Coverage increased (+0.05%) to 91.691% when pulling f179b1d on bbayles:is_authenticated_method into 87731d1 on jazzband:master.

@camilonova
Copy link
Member

Thank you. At the new version this is no longer needed.

@camilonova camilonova closed this Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants