Remove unnecessary calls to the database for user and permission metadata.
This commit is contained in:
parent
13298be5d3
commit
959016a6eb
5 changed files with 58 additions and 39 deletions
|
@ -7,6 +7,7 @@ from base64 import b64decode
|
|||
|
||||
from data import model
|
||||
from app import app
|
||||
from permissions import QuayDeferredPermissionUser
|
||||
|
||||
from util.names import parse_namespace_repository
|
||||
|
||||
|
@ -40,8 +41,9 @@ def process_basic_auth(auth):
|
|||
ctx = _request_ctx_stack.top
|
||||
ctx.authenticated_user = authenticated
|
||||
|
||||
identity_changed.send(app, identity=Identity(authenticated.username,
|
||||
'username'))
|
||||
new_identity = QuayDeferredPermissionUser(authenticated.username,
|
||||
'username')
|
||||
identity_changed.send(app, identity=new_identity)
|
||||
return
|
||||
|
||||
# We weren't able to authenticate via basic auth.
|
||||
|
|
Reference in a new issue