|
|
@ -20,9 +20,8 @@ def require_global_admin():
|
|
|
|
|
|
|
|
|
|
|
|
def get_user(user_email, admin=False):
|
|
|
|
def get_user(user_email, admin=False):
|
|
|
|
if user_email is None:
|
|
|
|
if user_email is None:
|
|
|
|
user = flask_login.current_user
|
|
|
|
user_email = flask_login.current_user.email
|
|
|
|
else:
|
|
|
|
user = models.User.query.get(user_email)
|
|
|
|
user = models.User.query.get(user_email)
|
|
|
|
|
|
|
|
if not user:
|
|
|
|
if not user:
|
|
|
|
flask.abort(404)
|
|
|
|
flask.abort(404)
|
|
|
|
if not user.domain in flask_login.current_user.get_managed_domains():
|
|
|
|
if not user.domain in flask_login.current_user.get_managed_domains():
|
|
|
|