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

Nová sekce webu s nástroji pro správce

parent 8609c921
No related branches found
No related tags found
1 merge request!138Zpracování nedoručenek
......@@ -191,6 +191,11 @@ def init_request():
raise NeedLoginError()
if user.is_org or user.is_admin:
return redirect(url_for('org_index'))
elif path.startswith('/admin/'):
if not user:
raise NeedLoginError()
if not user.is_admin:
raise werkzeug.exceptions.Forbidden()
elif path.startswith('/doc/'):
if user and (user.is_org or user.is_admin):
g.gatekeeper = mo.rights.Gatekeeper(user)
......@@ -260,6 +265,7 @@ except ImportError:
# Většina webu je v samostatných modulech
import mo.web.admin
import mo.web.api
import mo.web.api_dsn
import mo.web.acct
......
# Web: Nástroje pro správce
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment