Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: fix protection rule checks (#8862)
boojack5728d6b60087
diff --git a/backend/api/v1/schema_design_service.go b/backend/api/v1/schema_design_service.goindex de2d60814e..999f15d599 100644--- a/backend/api/v1/schema_design_service.go+++ b/backend/api/v1/schema_design_service.go@@ -251,6 +251,11 @@ func (s *SchemaDesignService) checkProtectionRules(ctx context.Context, projectif err != nil {return err}+ // Skip protection check for workspace owner and DBA.+ if isOwnerOrDBA(user.Role) {+ return nil+ }+for _, rule := range project.Setting.ProtectionRules {if rule.Target != storepb.ProtectionRule_BRANCH {continue@@ -276,8 +281,8 @@ func (s *SchemaDesignService) checkProtectionRules(ctx context.Context, project// Convert role format.if role == convertToProjectRole(binding.Role) {pass = true+ break}- break}}if pass {