mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
5132ebe07c
* feat: add tenant column to eventstore * feat: read tenant from context on push and filter * Update 07_events_table.sql * pass tenant to queryFactory * fix some query tests * init in tests * add missing sql files Co-authored-by: Livio Amstutz <livio.a@gmail.com>
13 lines
514 B
Go
13 lines
514 B
Go
package authz
|
|
|
|
import "context"
|
|
|
|
func NewMockContext(tenantID, orgID, userID string) context.Context {
|
|
return context.WithValue(context.Background(), dataKey, CtxData{UserID: userID, OrgID: orgID, TenantID: tenantID})
|
|
}
|
|
|
|
func NewMockContextWithPermissions(tenantID, orgID, userID string, permissions []string) context.Context {
|
|
ctx := context.WithValue(context.Background(), dataKey, CtxData{UserID: userID, OrgID: orgID, TenantID: tenantID})
|
|
return context.WithValue(ctx, requestPermissionsKey, permissions)
|
|
}
|