diff --git a/endpoints/api/repository.py b/endpoints/api/repository.py index cf49ff71e..59a30c224 100644 --- a/endpoints/api/repository.py +++ b/endpoints/api/repository.py @@ -3,7 +3,6 @@ import json from flask import current_app, request from flask.ext.restful import reqparse, abort -from flask.ext.login import current_user from data import model from endpoints.api import (truthy_bool, format_date, nickname, log_action, validate_json_request, @@ -13,8 +12,8 @@ from endpoints.api import (truthy_bool, format_date, nickname, log_action, valid from auth.permissions import (ReadRepositoryPermission, ModifyRepositoryPermission, AdministerRepositoryPermission, CreateRepositoryPermission) from auth.auth import process_auth -from auth import scopes from auth.auth_context import get_authenticated_user +from auth import scopes logger = logging.getLogger(__name__) @@ -113,8 +112,8 @@ class RepositoryList(ApiResource): } username = None - if current_user.is_authenticated() and args['private']: - username = current_user.db_user().username + if get_authenticated_user() and args['private']: + username = get_authenticated_user().username response = {}