Skip to content
Snippets Groups Projects
Commit 91e3be32 authored by Martin Mareš's avatar Martin Mareš
Browse files

Pro /doc/ je také k dispozici gatekeeper, je-li přihlášen org

parent 62c4b529
No related branches found
No related tags found
No related merge requests found
......@@ -170,6 +170,7 @@ def init_request():
g.user = user
if have_uwsgi:
uwsgi.set_logvar('osmo_uid', str(user.user_id) if user else '-')
g.gatekeeper = None
mo.now = mo.util.get_now()
g.now = mo.now # for templates
......@@ -187,6 +188,9 @@ def init_request():
raise NeedLoginError()
if user.is_org or user.is_admin:
return redirect(url_for('org_index'))
elif path.startswith('/doc/'):
if user.is_org or user.is_admin:
g.gatekeeper = mo.rights.Gatekeeper(user)
app.before_request(init_request)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment