mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing middleware to activate users. Faulty paths resulted in paths that had a / not being recognized. Thanks to @subglass!
This commit is contained in:
parent
8d8305a698
commit
2836989d71
1 changed files with 3 additions and 1 deletions
|
@ -10,7 +10,9 @@ from django.template import Template, Context
|
|||
|
||||
class LastSeenMiddleware(object):
|
||||
def process_response(self, request, response):
|
||||
if ((request.path in ('/', '/reader/refresh_feeds', '/reader/load_feeds'))
|
||||
if ((request.path == '/' or
|
||||
request.path.startswith('/reader/refresh_feeds') or
|
||||
request.path.startswith('/reader/load_feeds'))
|
||||
and hasattr(request, 'user')
|
||||
and request.user.is_authenticated()):
|
||||
hour_ago = datetime.datetime.utcnow() - datetime.timedelta(minutes=60)
|
||||
|
|
Loading…
Add table
Reference in a new issue