Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(frontend): type definitions for access control policy (#3526)
Liu Jid8ed9a1c094f
diff --git a/frontend/src/types/common.ts b/frontend/src/types/common.tsindex 42aab8e29b..f974e26038 100644--- a/frontend/src/types/common.ts+++ b/frontend/src/types/common.ts@@ -324,8 +324,11 @@ const makeUnknown = (type: ResourceType) => {updater: UNKNOWN_PRINCIPAL,updatedTs: 0,rowStatus: "NORMAL",+ resourceType: "",+ resourceId: UNKNOWN_ID,environment: UNKNOWN_ENVIRONMENT,type: "bb.policy.pipeline-approval",+ inheritFromParent: false,payload: {value: DefaultApprovalPolicy,assigneeGroupList: [],@@ -752,8 +755,11 @@ const makeEmpty = (type: ResourceType) => {updater: EMPTY_PRINCIPAL,updatedTs: 0,rowStatus: "NORMAL",+ resourceType: "",+ resourceId: EMPTY_ID,environment: EMPTY_ENVIRONMENT,type: "bb.policy.pipeline-approval",+ inheritFromParent: false,payload: {value: DefaultApprovalPolicy,assigneeGroupList: [],diff --git a/frontend/src/types/policy.ts b/frontend/src/types/policy.tsindex b9dc4f39b1..89f2e8ed10 100644--- a/frontend/src/types/policy.ts+++ b/frontend/src/types/policy.ts@@ -14,7 +14,8 @@ export type PolicyType =| "bb.policy.backup-plan"| "bb.policy.sql-review"| "bb.policy.environment-tier"- | "bb.policy.sensitive-data";+ | "bb.policy.sensitive-data"+ | "bb.policy.access-control";export type PipelineApprovalPolicyValue =| "MANUAL_APPROVAL_NEVER"@@ -81,12 +82,21 @@ export type SensitiveDataPolicyPayload = {sensitiveDataList: SensitiveData[];};+export type AccessControlRule = {+ fullDatabase: boolean;+};++export type AccessControlPolicyPayload = {+ disallowRuleList: AccessControlRule[];+};+export type PolicyPayload =| PipelineApprovalPolicyPayload| BackupPlanPolicyPayload| SQLReviewPolicyPayload| EnvironmentTierPolicyPayload- | SensitiveDataPolicyPayload;+ | SensitiveDataPolicyPayload+ | AccessControlPolicyPayload;export type PolicyResourceType =| ""@@ -112,6 +122,7 @@ export type Policy = {environment: Environment;// Domain specific fields+ inheritFromParent: boolean;type: PolicyType;payload: PolicyPayload;};@@ -121,5 +132,6 @@ export type PolicyUpsert = {rowStatus?: RowStatus;// Domain specific fields+ inheritFromParent: boolean;payload?: PolicyPayload;};