Add mutli-tenancy support to the registry

This commit is contained in:
Ben Toogood
2020-05-13 10:40:08 +01:00
parent 762a5bc9e8
commit 346e034d0a
2 changed files with 46 additions and 4 deletions

View File

@@ -276,7 +276,9 @@ func AuthHandler(fn func() auth.Auth) server.HandlerWrapper {
}
// There is an account, set it in the context
ctx = auth.ContextWithAccount(ctx, account)
if len(account.ID) > 0 {
ctx = auth.ContextWithAccount(ctx, account)
}
// The user is authorised, allow the call
return h(ctx, req, rsp)