From c7e7ef8e749b1589789640113b319de45b5c5068 Mon Sep 17 00:00:00 2001 From: Livio Amstutz Date: Thu, 15 Apr 2021 10:57:01 +0200 Subject: [PATCH] feat: make x-zitadel-orgid optional (resource owner by default) (#1591) --- internal/api/authz/context.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/api/authz/context.go b/internal/api/authz/context.go index 63af939e95..8e1b9f74a4 100644 --- a/internal/api/authz/context.go +++ b/internal/api/authz/context.go @@ -80,6 +80,9 @@ func VerifyTokenAndCreateCtxData(ctx context.Context, token, orgID string, t *To if err := checkOrigin(ctx, origins); err != nil { return CtxData{}, err } + if orgID == "" { + orgID = resourceOwner + } return CtxData{ UserID: userID, OrgID: orgID,