diff --git a/endpoints/api.py b/endpoints/api.py index 5548f62b9..2b31e4700 100644 --- a/endpoints/api.py +++ b/endpoints/api.py @@ -50,9 +50,7 @@ def csrf_protect(): logger.error(msg, token, found_token) if not token: - req_user = current_user.db_user().username if current_user else None - logger.warning('No CSRF token in session for current user: %s' % - req_user) + logger.warning('No CSRF token in session.') def request_error(exception=None, **kwargs): diff --git a/test/specs.py b/test/specs.py index 9ffcdc009..e0a037655 100644 --- a/test/specs.py +++ b/test/specs.py @@ -202,9 +202,11 @@ def build_specs(): 403, 403, 200, 200), TestSpec(url_for('api.get_repo_builds', repository=PUBLIC_REPO), - admin_code=403), - TestSpec(url_for('api.get_repo_builds', repository=ORG_REPO)), - TestSpec(url_for('api.get_repo_builds', repository=PRIVATE_REPO)), + 200, 200, 200, 200), + TestSpec(url_for('api.get_repo_builds', repository=ORG_REPO), + 403, 403, 200, 200), + TestSpec(url_for('api.get_repo_builds', repository=PRIVATE_REPO), + 403, 403, 200, 200), TestSpec(url_for('api.get_filedrop_url'), 401, 200, 200, 200).set_method('POST').set_data_from_obj(FILE_DROP_DETAILS),