mirror of
https://github.com/Kozea/Radicale.git
synced 2025-07-23 17:48:30 +00:00
Redirect authenticated users with no calendar found
This commit is contained in:
parent
5137709801
commit
5f26c131a9
1 changed files with 2 additions and 2 deletions
|
@ -192,7 +192,7 @@ class Application(object):
|
|||
else:
|
||||
user = password = None
|
||||
|
||||
last_allowed = False
|
||||
last_allowed = None
|
||||
calendars = []
|
||||
for calendar in items:
|
||||
if not isinstance(calendar, ical.Calendar):
|
||||
|
@ -222,7 +222,7 @@ class Application(object):
|
|||
# Calendars found
|
||||
status, headers, answer = function(
|
||||
environ, calendars, content, user)
|
||||
elif user and last_allowed:
|
||||
elif user and last_allowed is None:
|
||||
# Good user and no calendars found, redirect user to home
|
||||
location = "/%s/" % str(quote(user))
|
||||
log.LOGGER.info("redirecting to %s" % location)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue