Commit c3a8dbca authored by Robin Sonnabend's avatar Robin Sonnabend

Merge branch 'master' of

parents c16fe3b2 b6a8aa25
......@@ -17,6 +17,9 @@ class User:
self.obsolete = obsolete
self.permanent = permanent
def __repr__(self):
return "<User({})>".format(self.username)
def summarize(self):
return ":".join((
self.username, ",".join(self.groups), ",".join(self.all_groups),
......@@ -33,7 +36,7 @@ class User:
timestamp = datetime.fromtimestamp(float(timestamp_str))
obsolete = obsolete_str == "True"
groups = group_str.split(",")
all_groups = group_str.split(",")
all_groups = all_group_str.split(",")
permanent = permanent_str == "True"
return User(name, groups, all_groups, timestamp, obsolete, permanent)
......@@ -28,7 +28,6 @@ def url(default=default_view, cookie=cookie, **url_args):
def redirect(default=default_view, cookie=cookie, **url_args):
print(request.url, request.url_rule, default, session.get(cookie))
target = url(default, cookie, **url_args)
if target == request.url:
target = default_url(default, **url_args)
from functools import wraps
from hmac import compare_digest
import hashlib
import os
from flask import request, abort, session
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment