Skip to content

Commit

Permalink
Merge branch 'release/0.6.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlov99 committed Feb 17, 2015
2 parents 533e8e9 + befbbad commit 41ce59e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jsonapi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
""" JSON:API realization."""
__version = (0, 6, 7)
__version = (0, 6, 8)

__version__ = version = '.'.join(map(str, __version))
__project__ = PROJECT = __name__
5 changes: 4 additions & 1 deletion jsonapi/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,8 @@ class Meta:
def authenticate(cls, request):
for authenticator in cls.Meta.authenticators:
user = authenticator.authenticate(request)
if user:
# if authenticater returns user with valid id, return it. NOTE:
# request.user returns SimpleLazy object with is not False, but
# might be AnonymousUser.
if user and user.id:
return user

0 comments on commit 41ce59e

Please sign in to comment.