diff --git a/endpoints/api.py b/endpoints/api.py index 22300cb52..5f929aca2 100644 --- a/endpoints/api.py +++ b/endpoints/api.py @@ -44,6 +44,10 @@ def api_login_required(f): current_user.db_user().organization): abort(401) + if (current_user and current_user.db_user() and + current_user.db_user().robot): + abort(401) + return f(*args, **kwargs) return decorated_view