AuthN: Fix namespaces for anonymous and render (#75661)

* AuthN: remove IsAnonymous from identity struct and set correct namespace for anonymous and render

* Don't parse user id for render namespace
This commit is contained in:
Karl Persson
2023-09-29 09:10:33 +02:00
committed by GitHub
parent 0e2b741fc3
commit 7a38090bc0
10 changed files with 20 additions and 17 deletions

View File

@@ -45,7 +45,7 @@ func (c *Render) Authenticate(ctx context.Context, r *authn.Request) (*authn.Ide
var identity *authn.Identity
if renderUsr.UserID <= 0 {
identity = &authn.Identity{
ID: authn.NamespacedID(authn.NamespaceUser, 0),
ID: authn.NamespacedID(authn.NamespaceRenderService, 0),
OrgID: renderUsr.OrgID,
OrgRoles: map[int64]org.RoleType{renderUsr.OrgID: org.RoleType(renderUsr.OrgRole)},
ClientParams: authn.ClientParams{SyncPermissions: true},