mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-23 15:28:21 +00:00
fixup! fixup! fixup! fixup! fixup! fixup! feat(permissions): Addeding system user support for permission check v2
This commit is contained in:
@@ -11,15 +11,15 @@ import (
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
)
|
||||
|
||||
type InitPermittedOrgsFunction struct {
|
||||
type InitPermittedOrgsFunction51 struct {
|
||||
eventstoreClient *database.DB
|
||||
}
|
||||
|
||||
//go:embed 49/*.sql
|
||||
var permittedOrgsFunction embed.FS
|
||||
//go:embed 51/*.sql
|
||||
var permittedOrgsFunction51 embed.FS
|
||||
|
||||
func (mig *InitPermittedOrgsFunction) Execute(ctx context.Context, _ eventstore.Event) error {
|
||||
statements, err := readStatements(permittedOrgsFunction, "51", "")
|
||||
func (mig *InitPermittedOrgsFunction51) Execute(ctx context.Context, _ eventstore.Event) error {
|
||||
statements, err := readStatements(permittedOrgsFunction51, "51", "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -32,6 +32,6 @@ func (mig *InitPermittedOrgsFunction) Execute(ctx context.Context, _ eventstore.
|
||||
return nil
|
||||
}
|
||||
|
||||
func (*InitPermittedOrgsFunction) String() string {
|
||||
func (*InitPermittedOrgsFunction51) String() string {
|
||||
return "51_init_permitted_orgs_function"
|
||||
}
|
||||
|
@@ -139,7 +139,7 @@ type Steps struct {
|
||||
s48Apps7SAMLConfigsLoginVersion *Apps7SAMLConfigsLoginVersion
|
||||
s49InitPermittedOrgsFunction *InitPermittedOrgsFunction
|
||||
s50IDPTemplate6UsePKCE *IDPTemplate6UsePKCE
|
||||
s51InitPermittedOrgsFunction *InitPermittedOrgsFunction
|
||||
s51InitPermittedOrgsFunction *InitPermittedOrgsFunction51
|
||||
}
|
||||
|
||||
func MustNewSteps(v *viper.Viper) *Steps {
|
||||
|
@@ -177,7 +177,7 @@ func Setup(ctx context.Context, config *Config, steps *Steps, masterKey string)
|
||||
steps.s48Apps7SAMLConfigsLoginVersion = &Apps7SAMLConfigsLoginVersion{dbClient: dbClient}
|
||||
steps.s49InitPermittedOrgsFunction = &InitPermittedOrgsFunction{eventstoreClient: dbClient}
|
||||
steps.s50IDPTemplate6UsePKCE = &IDPTemplate6UsePKCE{dbClient: dbClient}
|
||||
steps.s51InitPermittedOrgsFunction = &InitPermittedOrgsFunction{eventstoreClient: dbClient}
|
||||
steps.s51InitPermittedOrgsFunction = &InitPermittedOrgsFunction51{eventstoreClient: dbClient}
|
||||
|
||||
err = projection.Create(ctx, dbClient, eventstoreClient, config.Projections, nil, nil, nil)
|
||||
logging.OnError(err).Fatal("unable to start projections")
|
||||
|
Reference in New Issue
Block a user