Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

refactor: migrate DisableCopyDataPolicy to QueryDataPolicy (#17477)

Danny Xu760a88bbbd22
diff --git a/.golangci.yaml b/.golangci.yaml
index 8b1cf8f872..cd0f60d7db 100644
--- a/.golangci.yaml
+++ b/.golangci.yaml
@@ -83,6 +83,10 @@ linters:
disabled: true
- name: max-control-nesting
disabled: true
+ - name: identical-switch-branches
+ disabled: true
+ - name: identical-ifelseif-branches
+ disabled: true
- name: comment-spacings
arguments:
- exhaustive
@@ -110,6 +114,8 @@ linters:
text: Enter(.*)_(.*)
- path: (.+)\.go$
text: Exit(.*)_(.*)
+ - path: action/bitbucket/bitbucket.go
+ text: "unsecure-url-scheme.*http://api.bitbucket.org"
paths:
- proto/generated-go
- frontend
diff --git a/backend/api/v1/org_policy_service.go b/backend/api/v1/org_policy_service.go
index 6c08570d87..3498318e84 100644
--- a/backend/api/v1/org_policy_service.go
+++ b/backend/api/v1/org_policy_service.go
@@ -24,8 +24,7 @@ var (
allowedResourceTypes = map[storepb.Policy_Type][]storepb.Policy_Resource{
storepb.Policy_ROLLOUT: {storepb.Policy_ENVIRONMENT},
storepb.Policy_TAG: {storepb.Policy_ENVIRONMENT, storepb.Policy_PROJECT},
- storepb.Policy_DISABLE_COPY_DATA: {storepb.Policy_ENVIRONMENT, storepb.Policy_PROJECT},
- storepb.Policy_QUERY_DATA: {storepb.Policy_WORKSPACE},
+ storepb.Policy_QUERY_DATA: {storepb.Policy_WORKSPACE, storepb.Policy_ENVIRONMENT, storepb.Policy_PROJECT},
storepb.Policy_MASKING_RULE: {storepb.Policy_WORKSPACE},
storepb.Policy_MASKING_EXCEPTION: {storepb.Policy_PROJECT},
storepb.Policy_RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW: {storepb.Policy_WORKSPACE, storepb.Policy_PROJECT},
@@ -204,8 +203,6 @@ func pathMatchType(path string, policyType storepb.Policy_Type) bool {
switch policyType {
case storepb.Policy_ROLLOUT:
return path == "rollout_policy"
- case storepb.Policy_DISABLE_COPY_DATA:
- return path == "disable_copy_data_policy"
case storepb.Policy_MASKING_RULE:
return path == "masking_rule_policy"
case storepb.Policy_MASKING_EXCEPTION:
@@ -442,17 +439,13 @@ func (s *OrgPolicyService) convertPolicyPayloadToString(ctx context.Context, pol
return "", errors.Wrap(err, "failed to marshal tag policy")
}
return string(payloadBytes), nil
- case v1pb.PolicyType_DISABLE_COPY_DATA:
- if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_RESTRICT_COPYING_DATA); err != nil {
- return "", connect.NewError(connect.CodePermissionDenied, err)
- }
- payload := convertToDisableCopyDataPolicyPayload(policy.GetDisableCopyDataPolicy())
- payloadBytes, err := protojson.Marshal(payload)
- if err != nil {
- return "", errors.Wrap(err, "failed to marshal policy")
- }
- return string(payloadBytes), nil
case v1pb.PolicyType_DATA_QUERY:
+ // Check license for both query policy and restrict copying data features
+ if policy.GetQueryDataPolicy() != nil && policy.GetQueryDataPolicy().DisableCopyData {
+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_RESTRICT_COPYING_DATA); err != nil {
+ return "", connect.NewError(connect.CodePermissionDenied, err)
+ }
+ }
if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_QUERY_POLICY); err != nil {
return "", connect.NewError(connect.CodePermissionDenied, err)
}
@@ -538,12 +531,6 @@ func (s *OrgPolicyService) convertToPolicy(ctx context.Context, policyMessage *s
policy.Policy = &v1pb.Policy_TagPolicy{
TagPolicy: p,
}
- case storepb.Policy_DISABLE_COPY_DATA:
- payload, err := convertToV1PBDisableCopyDataPolicy(policyMessage.Payload)
- if err != nil {
- return nil, err
- }
- policy.Policy = payload
case storepb.Policy_QUERY_DATA:
payload, err := convertToV1PBQueryDataPolicy(policyMessage.Payload)
if err != nil {
@@ -687,18 +674,6 @@ func convertToStorePBRolloutPolicy(policy *v1pb.RolloutPolicy) *storepb.RolloutP
}
}
-func convertToV1PBDisableCopyDataPolicy(payloadStr string) (*v1pb.Policy_DisableCopyDataPolicy, error) {
- payload := &storepb.DisableCopyDataPolicy{}
- if err := common.ProtojsonUnmarshaler.Unmarshal([]byte(payloadStr), payload); err != nil {
- return nil, errors.Wrapf(err, "failed to unmarshal disable copy policy payload")
- }
- return &v1pb.Policy_DisableCopyDataPolicy{
- DisableCopyDataPolicy: &v1pb.DisableCopyDataPolicy{
- Active: payload.Active,
- },
- }, nil
-}
-
func convertToV1PBQueryDataPolicy(payloadStr string) (*v1pb.Policy_QueryDataPolicy, error) {
payload := &storepb.QueryDataPolicy{}
if err := common.ProtojsonUnmarshaler.Unmarshal([]byte(payloadStr), payload); err != nil {
@@ -710,22 +685,18 @@ func convertToV1PBQueryDataPolicy(payloadStr string) (*v1pb.Policy_QueryDataPoli
DisableExport: payload.DisableExport,
MaximumResultSize: payload.MaximumResultSize,
MaximumResultRows: payload.MaximumResultRows,
+ DisableCopyData: payload.DisableCopyData,
},
}, nil
}
-func convertToDisableCopyDataPolicyPayload(policy *v1pb.DisableCopyDataPolicy) *storepb.DisableCopyDataPolicy {
- return &storepb.DisableCopyDataPolicy{
- Active: policy.Active,
- }
-}
-
func convertToQueryDataPolicyPayload(policy *v1pb.QueryDataPolicy) *storepb.QueryDataPolicy {
return &storepb.QueryDataPolicy{
Timeout: policy.Timeout,
DisableExport: policy.DisableExport,
MaximumResultSize: policy.MaximumResultSize,
MaximumResultRows: policy.MaximumResultRows,
+ DisableCopyData: policy.DisableCopyData,
}
}
@@ -869,8 +840,6 @@ func convertV1PBToStorePBPolicyType(pType v1pb.PolicyType) (storepb.Policy_Type,
return storepb.Policy_MASKING_RULE, nil
case v1pb.PolicyType_MASKING_EXCEPTION:
return storepb.Policy_MASKING_EXCEPTION, nil
- case v1pb.PolicyType_DISABLE_COPY_DATA:
- return storepb.Policy_DISABLE_COPY_DATA, nil
case v1pb.PolicyType_DATA_QUERY:
return storepb.Policy_QUERY_DATA, nil
case v1pb.PolicyType_RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW:
@@ -892,8 +861,6 @@ func convertStorePBToV1PBPolicyType(pType storepb.Policy_Type) v1pb.PolicyType {
return v1pb.PolicyType_MASKING_RULE
case storepb.Policy_MASKING_EXCEPTION:
return v1pb.PolicyType_MASKING_EXCEPTION
- case storepb.Policy_DISABLE_COPY_DATA:
- return v1pb.PolicyType_DISABLE_COPY_DATA
case storepb.Policy_QUERY_DATA:
return v1pb.PolicyType_DATA_QUERY
case storepb.Policy_RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW:
diff --git a/backend/generated-go/store/policy.pb.go b/backend/generated-go/store/policy.pb.go
index b7e646520a..1aa67047c5 100644
--- a/backend/generated-go/store/policy.pb.go
+++ b/backend/generated-go/store/policy.pb.go
@@ -81,7 +81,6 @@ const (
Policy_TYPE_UNSPECIFIED Policy_Type = 0
Policy_ROLLOUT Policy_Type = 1
Policy_MASKING_EXCEPTION Policy_Type = 2
- Policy_DISABLE_COPY_DATA Policy_Type = 3
Policy_QUERY_DATA Policy_Type = 5
Policy_MASKING_RULE Policy_Type = 6
Policy_RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW Policy_Type = 7
@@ -96,7 +95,6 @@ var (
0: "TYPE_UNSPECIFIED",
1: "ROLLOUT",
2: "MASKING_EXCEPTION",
- 3: "DISABLE_COPY_DATA",
5: "QUERY_DATA",
6: "MASKING_RULE",
7: "RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW",
@@ -108,7 +106,6 @@ var (
"TYPE_UNSPECIFIED": 0,
"ROLLOUT": 1,
"MASKING_EXCEPTION": 2,
- "DISABLE_COPY_DATA": 3,
"QUERY_DATA": 5,
"MASKING_RULE": 6,
"RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW": 7,
@@ -395,7 +392,7 @@ func (x DataSourceQueryPolicy_Restriction) Number() protoreflect.EnumNumber {
// Deprecated: Use DataSourceQueryPolicy_Restriction.Descriptor instead.
func (DataSourceQueryPolicy_Restriction) EnumDescriptor() ([]byte, []int) {
- return file_store_policy_proto_rawDescGZIP(), []int{12, 0}
+ return file_store_policy_proto_rawDescGZIP(), []int{11, 0}
}
type Policy struct {
@@ -888,51 +885,6 @@ func (x *EnvironmentTierPolicy) GetColor() string {
return ""
}
-// DisableCopyDataPolicy is the policy configuration for disabling copying data.
-type DisableCopyDataPolicy struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *DisableCopyDataPolicy) Reset() {
- *x = DisableCopyDataPolicy{}
- mi := &file_store_policy_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *DisableCopyDataPolicy) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DisableCopyDataPolicy) ProtoMessage() {}
-
-func (x *DisableCopyDataPolicy) ProtoReflect() protoreflect.Message {
- mi := &file_store_policy_proto_msgTypes[9]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DisableCopyDataPolicy.ProtoReflect.Descriptor instead.
-func (*DisableCopyDataPolicy) Descriptor() ([]byte, []int) {
- return file_store_policy_proto_rawDescGZIP(), []int{9}
-}
-
-func (x *DisableCopyDataPolicy) GetActive() bool {
- if x != nil {
- return x.Active
- }
- return false
-}
-
// QueryDataPolicy is the policy configuration for querying data.
type QueryDataPolicy struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -946,13 +898,15 @@ type QueryDataPolicy struct {
// The return rows limit.
// The default value is -1, means no limit.
MaximumResultRows int32 `protobuf:"varint,4,opt,name=maximum_result_rows,json=maximumResultRows,proto3" json:"maximum_result_rows,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ // Disable copying data.
+ DisableCopyData bool `protobuf:"varint,5,opt,name=disable_copy_data,json=disableCopyData,proto3" json:"disable_copy_data,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *QueryDataPolicy) Reset() {
*x = QueryDataPolicy{}
- mi := &file_store_policy_proto_msgTypes[10]
+ mi := &file_store_policy_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -964,7 +918,7 @@ func (x *QueryDataPolicy) String() string {
func (*QueryDataPolicy) ProtoMessage() {}
func (x *QueryDataPolicy) ProtoReflect() protoreflect.Message {
- mi := &file_store_policy_proto_msgTypes[10]
+ mi := &file_store_policy_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -977,7 +931,7 @@ func (x *QueryDataPolicy) ProtoReflect() protoreflect.Message {
// Deprecated: Use QueryDataPolicy.ProtoReflect.Descriptor instead.
func (*QueryDataPolicy) Descriptor() ([]byte, []int) {
- return file_store_policy_proto_rawDescGZIP(), []int{10}
+ return file_store_policy_proto_rawDescGZIP(), []int{9}
}
func (x *QueryDataPolicy) GetTimeout() *durationpb.Duration {
@@ -1008,6 +962,13 @@ func (x *QueryDataPolicy) GetMaximumResultRows() int32 {
return 0
}
+func (x *QueryDataPolicy) GetDisableCopyData() bool {
+ if x != nil {
+ return x.DisableCopyData
+ }
+ return false
+}
+
// RestrictIssueCreationForSQLReviewPolicy is the policy configuration for restricting issue creation for SQL review.
type RestrictIssueCreationForSQLReviewPolicy struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -1018,7 +979,7 @@ type RestrictIssueCreationForSQLReviewPolicy struct {
func (x *RestrictIssueCreationForSQLReviewPolicy) Reset() {
*x = RestrictIssueCreationForSQLReviewPolicy{}
- mi := &file_store_policy_proto_msgTypes[11]
+ mi := &file_store_policy_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1030,7 +991,7 @@ func (x *RestrictIssueCreationForSQLReviewPolicy) String() string {
func (*RestrictIssueCreationForSQLReviewPolicy) ProtoMessage() {}
func (x *RestrictIssueCreationForSQLReviewPolicy) ProtoReflect() protoreflect.Message {
- mi := &file_store_policy_proto_msgTypes[11]
+ mi := &file_store_policy_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1043,7 +1004,7 @@ func (x *RestrictIssueCreationForSQLReviewPolicy) ProtoReflect() protoreflect.Me
// Deprecated: Use RestrictIssueCreationForSQLReviewPolicy.ProtoReflect.Descriptor instead.
func (*RestrictIssueCreationForSQLReviewPolicy) Descriptor() ([]byte, []int) {
- return file_store_policy_proto_rawDescGZIP(), []int{11}
+ return file_store_policy_proto_rawDescGZIP(), []int{10}
}
func (x *RestrictIssueCreationForSQLReviewPolicy) GetDisallow() bool {
@@ -1067,7 +1028,7 @@ type DataSourceQueryPolicy struct {
func (x *DataSourceQueryPolicy) Reset() {
*x = DataSourceQueryPolicy{}
- mi := &file_store_policy_proto_msgTypes[12]
+ mi := &file_store_policy_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1079,7 +1040,7 @@ func (x *DataSourceQueryPolicy) String() string {
func (*DataSourceQueryPolicy) ProtoMessage() {}
func (x *DataSourceQueryPolicy) ProtoReflect() protoreflect.Message {
- mi := &file_store_policy_proto_msgTypes[12]
+ mi := &file_store_policy_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1092,7 +1053,7 @@ func (x *DataSourceQueryPolicy) ProtoReflect() protoreflect.Message {
// Deprecated: Use DataSourceQueryPolicy.ProtoReflect.Descriptor instead.
func (*DataSourceQueryPolicy) Descriptor() ([]byte, []int) {
- return file_store_policy_proto_rawDescGZIP(), []int{12}
+ return file_store_policy_proto_rawDescGZIP(), []int{11}
}
func (x *DataSourceQueryPolicy) GetAdminDataSourceRestriction() DataSourceQueryPolicy_Restriction {
@@ -1128,7 +1089,7 @@ type RolloutPolicy_Checkers struct {
func (x *RolloutPolicy_Checkers) Reset() {
*x = RolloutPolicy_Checkers{}
- mi := &file_store_policy_proto_msgTypes[13]
+ mi := &file_store_policy_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1140,7 +1101,7 @@ func (x *RolloutPolicy_Checkers) String() string {
func (*RolloutPolicy_Checkers) ProtoMessage() {}
func (x *RolloutPolicy_Checkers) ProtoReflect() protoreflect.Message {
- mi := &file_store_policy_proto_msgTypes[13]
+ mi := &file_store_policy_proto_msgTypes[12]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1180,7 +1141,7 @@ type RolloutPolicy_Checkers_RequiredStatusChecks struct {
func (x *RolloutPolicy_Checkers_RequiredStatusChecks) Reset() {
*x = RolloutPolicy_Checkers_RequiredStatusChecks{}
- mi := &file_store_policy_proto_msgTypes[14]
+ mi := &file_store_policy_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1192,7 +1153,7 @@ func (x *RolloutPolicy_Checkers_RequiredStatusChecks) String() string {
func (*RolloutPolicy_Checkers_RequiredStatusChecks) ProtoMessage() {}
func (x *RolloutPolicy_Checkers_RequiredStatusChecks) ProtoReflect() protoreflect.Message {
- mi := &file_store_policy_proto_msgTypes[14]
+ mi := &file_store_policy_proto_msgTypes[13]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1231,7 +1192,7 @@ type MaskingExceptionPolicy_MaskingException struct {
func (x *MaskingExceptionPolicy_MaskingException) Reset() {
*x = MaskingExceptionPolicy_MaskingException{}
- mi := &file_store_policy_proto_msgTypes[15]
+ mi := &file_store_policy_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1243,7 +1204,7 @@ func (x *MaskingExceptionPolicy_MaskingException) String() string {
func (*MaskingExceptionPolicy_MaskingException) ProtoMessage() {}
func (x *MaskingExceptionPolicy_MaskingException) ProtoReflect() protoreflect.Message {
- mi := &file_store_policy_proto_msgTypes[15]
+ mi := &file_store_policy_proto_msgTypes[14]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1292,7 +1253,7 @@ type MaskingRulePolicy_MaskingRule struct {
func (x *MaskingRulePolicy_MaskingRule) Reset() {
*x = MaskingRulePolicy_MaskingRule{}
- mi := &file_store_policy_proto_msgTypes[16]
+ mi := &file_store_policy_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1304,7 +1265,7 @@ func (x *MaskingRulePolicy_MaskingRule) String() string {
func (*MaskingRulePolicy_MaskingRule) ProtoMessage() {}
func (x *MaskingRulePolicy_MaskingRule) ProtoReflect() protoreflect.Message {
- mi := &file_store_policy_proto_msgTypes[16]
+ mi := &file_store_policy_proto_msgTypes[15]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1345,13 +1306,12 @@ var File_store_policy_proto protoreflect.FileDescriptor
const file_store_policy_proto_rawDesc = "" +
"\n" +
- "\x12store/policy.proto\x12\x0ebytebase.store\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x12store/common.proto\"\xac\x02\n" +
- "\x06Policy\"\xce\x01\n" +
+ "\x12store/policy.proto\x12\x0ebytebase.store\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x12store/common.proto\"\x95\x02\n" +
+ "\x06Policy\"\xb7\x01\n" +
"\x04Type\x12\x14\n" +
"\x10TYPE_UNSPECIFIED\x10\x00\x12\v\n" +
"\aROLLOUT\x10\x01\x12\x15\n" +
- "\x11MASKING_EXCEPTION\x10\x02\x12\x15\n" +
- "\x11DISABLE_COPY_DATA\x10\x03\x12\x0e\n" +
+ "\x11MASKING_EXCEPTION\x10\x02\x12\x0e\n" +
"\n" +
"QUERY_DATA\x10\x05\x12\x10\n" +
"\fMASKING_RULE\x10\x06\x12*\n" +
@@ -1422,14 +1382,13 @@ const file_store_policy_proto_rawDesc = "" +
"\x0fEnvironmentTier\x12 \n" +
"\x1cENVIRONMENT_TIER_UNSPECIFIED\x10\x00\x12\r\n" +
"\tPROTECTED\x10\x01\x12\x0f\n" +
- "\vUNPROTECTED\x10\x02\"/\n" +
- "\x15DisableCopyDataPolicy\x12\x16\n" +
- "\x06active\x18\x01 \x01(\bR\x06active\"\xcd\x01\n" +
+ "\vUNPROTECTED\x10\x02\"\xf9\x01\n" +
"\x0fQueryDataPolicy\x123\n" +
"\atimeout\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\atimeout\x12%\n" +
"\x0edisable_export\x18\x02 \x01(\bR\rdisableExport\x12.\n" +
"\x13maximum_result_size\x18\x03 \x01(\x03R\x11maximumResultSize\x12.\n" +
- "\x13maximum_result_rows\x18\x04 \x01(\x05R\x11maximumResultRows\"E\n" +
+ "\x13maximum_result_rows\x18\x04 \x01(\x05R\x11maximumResultRows\x12*\n" +
+ "\x11disable_copy_data\x18\x05 \x01(\bR\x0fdisableCopyData\"E\n" +
"'RestrictIssueCreationForSQLReviewPolicy\x12\x1a\n" +
"\bdisallow\x18\x01 \x01(\bR\bdisallow\"\x9b\x02\n" +
"\x15DataSourceQueryPolicy\x12t\n" +
@@ -1459,7 +1418,7 @@ func file_store_policy_proto_rawDescGZIP() []byte {
}
var file_store_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
-var file_store_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
+var file_store_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
var file_store_policy_proto_goTypes = []any{
(SQLReviewRuleLevel)(0), // 0: bytebase.store.SQLReviewRuleLevel
(Policy_Type)(0), // 1: bytebase.store.Policy.Type
@@ -1477,36 +1436,35 @@ var file_store_policy_proto_goTypes = []any{
(*Binding)(nil), // 13: bytebase.store.Binding
(*IamPolicy)(nil), // 14: bytebase.store.IamPolicy
(*EnvironmentTierPolicy)(nil), // 15: bytebase.store.EnvironmentTierPolicy
- (*DisableCopyDataPolicy)(nil), // 16: bytebase.store.DisableCopyDataPolicy
- (*QueryDataPolicy)(nil), // 17: bytebase.store.QueryDataPolicy
- (*RestrictIssueCreationForSQLReviewPolicy)(nil), // 18: bytebase.store.RestrictIssueCreationForSQLReviewPolicy
- (*DataSourceQueryPolicy)(nil), // 19: bytebase.store.DataSourceQueryPolicy
- (*RolloutPolicy_Checkers)(nil), // 20: bytebase.store.RolloutPolicy.Checkers
- (*RolloutPolicy_Checkers_RequiredStatusChecks)(nil), // 21: bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks
- (*MaskingExceptionPolicy_MaskingException)(nil), // 22: bytebase.store.MaskingExceptionPolicy.MaskingException
- (*MaskingRulePolicy_MaskingRule)(nil), // 23: bytebase.store.MaskingRulePolicy.MaskingRule
- nil, // 24: bytebase.store.TagPolicy.TagsEntry
- (Engine)(0), // 25: bytebase.store.Engine
- (*expr.Expr)(nil), // 26: google.type.Expr
- (*durationpb.Duration)(nil), // 27: google.protobuf.Duration
+ (*QueryDataPolicy)(nil), // 16: bytebase.store.QueryDataPolicy
+ (*RestrictIssueCreationForSQLReviewPolicy)(nil), // 17: bytebase.store.RestrictIssueCreationForSQLReviewPolicy
+ (*DataSourceQueryPolicy)(nil), // 18: bytebase.store.DataSourceQueryPolicy
+ (*RolloutPolicy_Checkers)(nil), // 19: bytebase.store.RolloutPolicy.Checkers
+ (*RolloutPolicy_Checkers_RequiredStatusChecks)(nil), // 20: bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks
+ (*MaskingExceptionPolicy_MaskingException)(nil), // 21: bytebase.store.MaskingExceptionPolicy.MaskingException
+ (*MaskingRulePolicy_MaskingRule)(nil), // 22: bytebase.store.MaskingRulePolicy.MaskingRule
+ nil, // 23: bytebase.store.TagPolicy.TagsEntry
+ (Engine)(0), // 24: bytebase.store.Engine
+ (*expr.Expr)(nil), // 25: google.type.Expr
+ (*durationpb.Duration)(nil), // 26: google.protobuf.Duration
}
var file_store_policy_proto_depIdxs = []int32{
- 20, // 0: bytebase.store.RolloutPolicy.checkers:type_name -> bytebase.store.RolloutPolicy.Checkers
- 22, // 1: bytebase.store.MaskingExceptionPolicy.masking_exceptions:type_name -> bytebase.store.MaskingExceptionPolicy.MaskingException
- 23, // 2: bytebase.store.MaskingRulePolicy.rules:type_name -> bytebase.store.MaskingRulePolicy.MaskingRule
+ 19, // 0: bytebase.store.RolloutPolicy.checkers:type_name -> bytebase.store.RolloutPolicy.Checkers
+ 21, // 1: bytebase.store.MaskingExceptionPolicy.masking_exceptions:type_name -> bytebase.store.MaskingExceptionPolicy.MaskingException
+ 22, // 2: bytebase.store.MaskingRulePolicy.rules:type_name -> bytebase.store.MaskingRulePolicy.MaskingRule
0, // 3: bytebase.store.SQLReviewRule.level:type_name -> bytebase.store.SQLReviewRuleLevel
- 25, // 4: bytebase.store.SQLReviewRule.engine:type_name -> bytebase.store.Engine
- 24, // 5: bytebase.store.TagPolicy.tags:type_name -> bytebase.store.TagPolicy.TagsEntry
- 26, // 6: bytebase.store.Binding.condition:type_name -> google.type.Expr
+ 24, // 4: bytebase.store.SQLReviewRule.engine:type_name -> bytebase.store.Engine
+ 23, // 5: bytebase.store.TagPolicy.tags:type_name -> bytebase.store.TagPolicy.TagsEntry
+ 25, // 6: bytebase.store.Binding.condition:type_name -> google.type.Expr
13, // 7: bytebase.store.IamPolicy.bindings:type_name -> bytebase.store.Binding
5, // 8: bytebase.store.EnvironmentTierPolicy.environment_tier:type_name -> bytebase.store.EnvironmentTierPolicy.EnvironmentTier
- 27, // 9: bytebase.store.QueryDataPolicy.timeout:type_name -> google.protobuf.Duration
+ 26, // 9: bytebase.store.QueryDataPolicy.timeout:type_name -> google.protobuf.Duration
6, // 10: bytebase.store.DataSourceQueryPolicy.admin_data_source_restriction:type_name -> bytebase.store.DataSourceQueryPolicy.Restriction
- 21, // 11: bytebase.store.RolloutPolicy.Checkers.required_status_checks:type_name -> bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks
+ 20, // 11: bytebase.store.RolloutPolicy.Checkers.required_status_checks:type_name -> bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks
3, // 12: bytebase.store.RolloutPolicy.Checkers.RequiredStatusChecks.plan_check_enforcement:type_name -> bytebase.store.RolloutPolicy.Checkers.PlanCheckEnforcement
4, // 13: bytebase.store.MaskingExceptionPolicy.MaskingException.action:type_name -> bytebase.store.MaskingExceptionPolicy.MaskingException.Action
- 26, // 14: bytebase.store.MaskingExceptionPolicy.MaskingException.condition:type_name -> google.type.Expr
- 26, // 15: bytebase.store.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr
+ 25, // 14: bytebase.store.MaskingExceptionPolicy.MaskingException.condition:type_name -> google.type.Expr
+ 25, // 15: bytebase.store.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr
16, // [16:16] is the sub-list for method output_type
16, // [16:16] is the sub-list for method input_type
16, // [16:16] is the sub-list for extension type_name
@@ -1526,7 +1484,7 @@ func file_store_policy_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_policy_proto_rawDesc), len(file_store_policy_proto_rawDesc)),
NumEnums: 7,
- NumMessages: 18,
+ NumMessages: 17,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/backend/generated-go/store/policy_equal.pb.go b/backend/generated-go/store/policy_equal.pb.go
index 521e07fb70..fd7338620b 100644
--- a/backend/generated-go/store/policy_equal.pb.go
+++ b/backend/generated-go/store/policy_equal.pb.go
@@ -18,6 +18,35 @@ func (x *Policy) Equal(y *Policy) bool {
return true
}
+func (x *RolloutPolicy_Checkers_RequiredStatusChecks) Equal(y *RolloutPolicy_Checkers_RequiredStatusChecks) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.PlanCheckEnforcement != y.PlanCheckEnforcement {
+ return false
+ }
+ return true
+}
+
+func (x *RolloutPolicy_Checkers) Equal(y *RolloutPolicy_Checkers) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.RequiredIssueApproval != y.RequiredIssueApproval {
+ return false
+ }
+ if !x.RequiredStatusChecks.Equal(y.RequiredStatusChecks) {
+ return false
+ }
+ return true
+}
+
func (x *RolloutPolicy) Equal(y *RolloutPolicy) bool {
if x == y {
return true
@@ -44,6 +73,9 @@ func (x *RolloutPolicy) Equal(y *RolloutPolicy) bool {
return false
}
}
+ if !x.Checkers.Equal(y.Checkers) {
+ return false
+ }
return true
}
@@ -232,19 +264,6 @@ func (x *EnvironmentTierPolicy) Equal(y *EnvironmentTierPolicy) bool {
return true
}
-func (x *DisableCopyDataPolicy) Equal(y *DisableCopyDataPolicy) bool {
- if x == y {
- return true
- }
- if x == nil || y == nil {
- return x == nil && y == nil
- }
- if x.Active != y.Active {
- return false
- }
- return true
-}
-
func (x *QueryDataPolicy) Equal(y *QueryDataPolicy) bool {
if x == y {
return true
@@ -264,6 +283,9 @@ func (x *QueryDataPolicy) Equal(y *QueryDataPolicy) bool {
if x.MaximumResultRows != y.MaximumResultRows {
return false
}
+ if x.DisableCopyData != y.DisableCopyData {
+ return false
+ }
return true
}
diff --git a/backend/generated-go/v1/org_policy_service.pb.go b/backend/generated-go/v1/org_policy_service.pb.go
index 789055f7ed..9b08f6304f 100644
--- a/backend/generated-go/v1/org_policy_service.pb.go
+++ b/backend/generated-go/v1/org_policy_service.pb.go
@@ -31,7 +31,6 @@ type PolicyType int32
const (
PolicyType_POLICY_TYPE_UNSPECIFIED PolicyType = 0
PolicyType_ROLLOUT_POLICY PolicyType = 11
- PolicyType_DISABLE_COPY_DATA PolicyType = 8
PolicyType_MASKING_RULE PolicyType = 9
PolicyType_MASKING_EXCEPTION PolicyType = 10
PolicyType_RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW PolicyType = 12
@@ -45,7 +44,6 @@ var (
PolicyType_name = map[int32]string{
0: "POLICY_TYPE_UNSPECIFIED",
11: "ROLLOUT_POLICY",
- 8: "DISABLE_COPY_DATA",
9: "MASKING_RULE",
10: "MASKING_EXCEPTION",
12: "RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW",
@@ -56,7 +54,6 @@ var (
PolicyType_value = map[string]int32{
"POLICY_TYPE_UNSPECIFIED": 0,
"ROLLOUT_POLICY": 11,
- "DISABLE_COPY_DATA": 8,
"MASKING_RULE": 9,
"MASKING_EXCEPTION": 10,
"RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW": 12,
@@ -295,7 +292,7 @@ func (x MaskingExceptionPolicy_MaskingException_Action) Number() protoreflect.En
// Deprecated: Use MaskingExceptionPolicy_MaskingException_Action.Descriptor instead.
func (MaskingExceptionPolicy_MaskingException_Action) EnumDescriptor() ([]byte, []int) {
- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{11, 0, 0}
+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10, 0, 0}
}
type DataSourceQueryPolicy_Restriction int32
@@ -346,7 +343,7 @@ func (x DataSourceQueryPolicy_Restriction) Number() protoreflect.EnumNumber {
// Deprecated: Use DataSourceQueryPolicy_Restriction.Descriptor instead.
func (DataSourceQueryPolicy_Restriction) EnumDescriptor() ([]byte, []int) {
- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{15, 0}
+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{14, 0}
}
type CreatePolicyRequest struct {
@@ -741,7 +738,6 @@ type Policy struct {
// Types that are valid to be assigned to Policy:
//
// *Policy_RolloutPolicy
- // *Policy_DisableCopyDataPolicy
// *Policy_MaskingRulePolicy
// *Policy_MaskingExceptionPolicy
// *Policy_RestrictIssueCreationForSqlReviewPolicy
@@ -823,15 +819,6 @@ func (x *Policy) GetRolloutPolicy() *RolloutPolicy {
return nil
}
-func (x *Policy) GetDisableCopyDataPolicy() *DisableCopyDataPolicy {
- if x != nil {
- if x, ok := x.Policy.(*Policy_DisableCopyDataPolicy); ok {
- return x.DisableCopyDataPolicy
- }
- }
- return nil
-}
-
func (x *Policy) GetMaskingRulePolicy() *MaskingRulePolicy {
if x != nil {
if x, ok := x.Policy.(*Policy_MaskingRulePolicy); ok {
@@ -908,10 +895,6 @@ type Policy_RolloutPolicy struct {
RolloutPolicy *RolloutPolicy `protobuf:"bytes,19,opt,name=rollout_policy,json=rolloutPolicy,proto3,oneof"`
}
-type Policy_DisableCopyDataPolicy struct {
- DisableCopyDataPolicy *DisableCopyDataPolicy `protobuf:"bytes,16,opt,name=disable_copy_data_policy,json=disableCopyDataPolicy,proto3,oneof"`
-}
-
type Policy_MaskingRulePolicy struct {
MaskingRulePolicy *MaskingRulePolicy `protobuf:"bytes,17,opt,name=masking_rule_policy,json=maskingRulePolicy,proto3,oneof"`
}
@@ -938,8 +921,6 @@ type Policy_QueryDataPolicy struct {
func (*Policy_RolloutPolicy) isPolicy_Policy() {}
-func (*Policy_DisableCopyDataPolicy) isPolicy_Policy() {}
-
func (*Policy_MaskingRulePolicy) isPolicy_Policy() {}
func (*Policy_MaskingExceptionPolicy) isPolicy_Policy() {}
@@ -1028,50 +1009,6 @@ func (x *RolloutPolicy) GetCheckers() *RolloutPolicy_Checkers {
return nil
}
-type DisableCopyDataPolicy struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *DisableCopyDataPolicy) Reset() {
- *x = DisableCopyDataPolicy{}
- mi := &file_v1_org_policy_service_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *DisableCopyDataPolicy) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DisableCopyDataPolicy) ProtoMessage() {}
-
-func (x *DisableCopyDataPolicy) ProtoReflect() protoreflect.Message {
- mi := &file_v1_org_policy_service_proto_msgTypes[8]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DisableCopyDataPolicy.ProtoReflect.Descriptor instead.
-func (*DisableCopyDataPolicy) Descriptor() ([]byte, []int) {
- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{8}
-}
-
-func (x *DisableCopyDataPolicy) GetActive() bool {
- if x != nil {
- return x.Active
- }
- return false
-}
-
// QueryDataPolicy is the policy configuration for querying data.
type QueryDataPolicy struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -1085,13 +1022,15 @@ type QueryDataPolicy struct {
// The return rows limit.
// The default value is -1, means no limit.
MaximumResultRows int32 `protobuf:"varint,4,opt,name=maximum_result_rows,json=maximumResultRows,proto3" json:"maximum_result_rows,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ // Disable copying data.
+ DisableCopyData bool `protobuf:"varint,5,opt,name=disable_copy_data,json=disableCopyData,proto3" json:"disable_copy_data,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *QueryDataPolicy) Reset() {
*x = QueryDataPolicy{}
- mi := &file_v1_org_policy_service_proto_msgTypes[9]
+ mi := &file_v1_org_policy_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1103,7 +1042,7 @@ func (x *QueryDataPolicy) String() string {
func (*QueryDataPolicy) ProtoMessage() {}
func (x *QueryDataPolicy) ProtoReflect() protoreflect.Message {
- mi := &file_v1_org_policy_service_proto_msgTypes[9]
+ mi := &file_v1_org_policy_service_proto_msgTypes[8]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1116,7 +1055,7 @@ func (x *QueryDataPolicy) ProtoReflect() protoreflect.Message {
// Deprecated: Use QueryDataPolicy.ProtoReflect.Descriptor instead.
func (*QueryDataPolicy) Descriptor() ([]byte, []int) {
- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{9}
+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{8}
}
func (x *QueryDataPolicy) GetTimeout() *durationpb.Duration {
@@ -1147,6 +1086,13 @@ func (x *QueryDataPolicy) GetMaximumResultRows() int32 {
return 0
}
+func (x *QueryDataPolicy) GetDisableCopyData() bool {
+ if x != nil {
+ return x.DisableCopyData
+ }
+ return false
+}
+
// The SQL review rules. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.
type SQLReviewRule struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -1162,7 +1108,7 @@ type SQLReviewRule struct {
func (x *SQLReviewRule) Reset() {
*x = SQLReviewRule{}
- mi := &file_v1_org_policy_service_proto_msgTypes[10]
+ mi := &file_v1_org_policy_service_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1174,7 +1120,7 @@ func (x *SQLReviewRule) String() string {
func (*SQLReviewRule) ProtoMessage() {}
func (x *SQLReviewRule) ProtoReflect() protoreflect.Message {
- mi := &file_v1_org_policy_service_proto_msgTypes[10]
+ mi := &file_v1_org_policy_service_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1187,7 +1133,7 @@ func (x *SQLReviewRule) ProtoReflect() protoreflect.Message {
// Deprecated: Use SQLReviewRule.ProtoReflect.Descriptor instead.
func (*SQLReviewRule) Descriptor() ([]byte, []int) {
- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10}
+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{9}
}
func (x *SQLReviewRule) GetType() string {
@@ -1235,7 +1181,7 @@ type MaskingExceptionPolicy struct {
func (x *MaskingExceptionPolicy) Reset() {
*x = MaskingExceptionPolicy{}
- mi := &file_v1_org_policy_service_proto_msgTypes[11]
+ mi := &file_v1_org_policy_service_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1247,7 +1193,7 @@ func (x *MaskingExceptionPolicy) String() string {
func (*MaskingExceptionPolicy) ProtoMessage() {}
func (x *MaskingExceptionPolicy) ProtoReflect() protoreflect.Message {
- mi := &file_v1_org_policy_service_proto_msgTypes[11]
+ mi := &file_v1_org_policy_service_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1260,7 +1206,7 @@ func (x *MaskingExceptionPolicy) ProtoReflect() protoreflect.Message {
// Deprecated: Use MaskingExceptionPolicy.ProtoReflect.Descriptor instead.
func (*MaskingExceptionPolicy) Descriptor() ([]byte, []int) {
- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{11}
+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10}
}
func (x *MaskingExceptionPolicy) GetMaskingExceptions() []*MaskingExceptionPolicy_MaskingException {
@@ -1279,7 +1225,7 @@ type MaskingRulePolicy struct {
func (x *MaskingRulePolicy) Reset() {
*x = MaskingRulePolicy{}
- mi := &file_v1_org_policy_service_proto_msgTypes[12]
+ mi := &file_v1_org_policy_service_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1291,7 +1237,7 @@ func (x *MaskingRulePolicy) String() string {
func (*MaskingRulePolicy) ProtoMessage() {}
func (x *MaskingRulePolicy) ProtoReflect() protoreflect.Message {
- mi := &file_v1_org_policy_service_proto_msgTypes[12]
+ mi := &file_v1_org_policy_service_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1304,7 +1250,7 @@ func (x *MaskingRulePolicy) ProtoReflect() protoreflect.Message {
// Deprecated: Use MaskingRulePolicy.ProtoReflect.Descriptor instead.
func (*MaskingRulePolicy) Descriptor() ([]byte, []int) {
- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{12}
+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{11}
}
func (x *MaskingRulePolicy) GetRules() []*MaskingRulePolicy_MaskingRule {
@@ -1323,7 +1269,7 @@ type RestrictIssueCreationForSQLReviewPolicy struct {
func (x *RestrictIssueCreationForSQLReviewPolicy) Reset() {
*x = RestrictIssueCreationForSQLReviewPolicy{}
- mi := &file_v1_org_policy_service_proto_msgTypes[13]
+ mi := &file_v1_org_policy_service_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1335,7 +1281,7 @@ func (x *RestrictIssueCreationForSQLReviewPolicy) String() string {
func (*RestrictIssueCreationForSQLReviewPolicy) ProtoMessage() {}
func (x *RestrictIssueCreationForSQLReviewPolicy) ProtoReflect() protoreflect.Message {
- mi := &file_v1_org_policy_service_proto_msgTypes[13]
+ mi := &file_v1_org_policy_service_proto_msgTypes[12]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1348,7 +1294,7 @@ func (x *RestrictIssueCreationForSQLReviewPolicy) ProtoReflect() protoreflect.Me
// Deprecated: Use RestrictIssueCreationForSQLReviewPolicy.ProtoReflect.Descriptor instead.
func (*RestrictIssueCreationForSQLReviewPolicy) Descriptor() ([]byte, []int) {
- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{13}
+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{12}
}
func (x *RestrictIssueCreationForSQLReviewPolicy) GetDisallow() bool {
@@ -1369,7 +1315,7 @@ type TagPolicy struct {
func (x *TagPolicy) Reset() {
*x = TagPolicy{}
- mi := &file_v1_org_policy_service_proto_msgTypes[14]
+ mi := &file_v1_org_policy_service_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1381,7 +1327,7 @@ func (x *TagPolicy) String() string {
func (*TagPolicy) ProtoMessage() {}
func (x *TagPolicy) ProtoReflect() protoreflect.Message {
- mi := &file_v1_org_policy_service_proto_msgTypes[14]
+ mi := &file_v1_org_policy_service_proto_msgTypes[13]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1394,7 +1340,7 @@ func (x *TagPolicy) ProtoReflect() protoreflect.Message {
// Deprecated: Use TagPolicy.ProtoReflect.Descriptor instead.
func (*TagPolicy) Descriptor() ([]byte, []int) {
- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{14}
+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{13}
}
func (x *TagPolicy) GetTags() map[string]string {
@@ -1418,7 +1364,7 @@ type DataSourceQueryPolicy struct {
func (x *DataSourceQueryPolicy) Reset() {
*x = DataSourceQueryPolicy{}
- mi := &file_v1_org_policy_service_proto_msgTypes[15]
+ mi := &file_v1_org_policy_service_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1430,7 +1376,7 @@ func (x *DataSourceQueryPolicy) String() string {
func (*DataSourceQueryPolicy) ProtoMessage() {}
func (x *DataSourceQueryPolicy) ProtoReflect() protoreflect.Message {
- mi := &file_v1_org_policy_service_proto_msgTypes[15]
+ mi := &file_v1_org_policy_service_proto_msgTypes[14]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1443,7 +1389,7 @@ func (x *DataSourceQueryPolicy) ProtoReflect() protoreflect.Message {
// Deprecated: Use DataSourceQueryPolicy.ProtoReflect.Descriptor instead.
func (*DataSourceQueryPolicy) Descriptor() ([]byte, []int) {
- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{15}
+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{14}
}
func (x *DataSourceQueryPolicy) GetAdminDataSourceRestriction() DataSourceQueryPolicy_Restriction {
@@ -1479,7 +1425,7 @@ type RolloutPolicy_Checkers struct {
func (x *RolloutPolicy_Checkers) Reset() {
*x = RolloutPolicy_Checkers{}
- mi := &file_v1_org_policy_service_proto_msgTypes[16]
+ mi := &file_v1_org_policy_service_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1491,7 +1437,7 @@ func (x *RolloutPolicy_Checkers) String() string {
func (*RolloutPolicy_Checkers) ProtoMessage() {}
func (x *RolloutPolicy_Checkers) ProtoReflect() protoreflect.Message {
- mi := &file_v1_org_policy_service_proto_msgTypes[16]
+ mi := &file_v1_org_policy_service_proto_msgTypes[15]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1531,7 +1477,7 @@ type RolloutPolicy_Checkers_RequiredStatusChecks struct {
func (x *RolloutPolicy_Checkers_RequiredStatusChecks) Reset() {
*x = RolloutPolicy_Checkers_RequiredStatusChecks{}
- mi := &file_v1_org_policy_service_proto_msgTypes[17]
+ mi := &file_v1_org_policy_service_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1543,7 +1489,7 @@ func (x *RolloutPolicy_Checkers_RequiredStatusChecks) String() string {
func (*RolloutPolicy_Checkers_RequiredStatusChecks) ProtoMessage() {}
func (x *RolloutPolicy_Checkers_RequiredStatusChecks) ProtoReflect() protoreflect.Message {
- mi := &file_v1_org_policy_service_proto_msgTypes[17]
+ mi := &file_v1_org_policy_service_proto_msgTypes[16]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1598,7 +1544,7 @@ type MaskingExceptionPolicy_MaskingException struct {
func (x *MaskingExceptionPolicy_MaskingException) Reset() {
*x = MaskingExceptionPolicy_MaskingException{}
- mi := &file_v1_org_policy_service_proto_msgTypes[18]
+ mi := &file_v1_org_policy_service_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1610,7 +1556,7 @@ func (x *MaskingExceptionPolicy_MaskingException) String() string {
func (*MaskingExceptionPolicy_MaskingException) ProtoMessage() {}
func (x *MaskingExceptionPolicy_MaskingException) ProtoReflect() protoreflect.Message {
- mi := &file_v1_org_policy_service_proto_msgTypes[18]
+ mi := &file_v1_org_policy_service_proto_msgTypes[17]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1623,7 +1569,7 @@ func (x *MaskingExceptionPolicy_MaskingException) ProtoReflect() protoreflect.Me
// Deprecated: Use MaskingExceptionPolicy_MaskingException.ProtoReflect.Descriptor instead.
func (*MaskingExceptionPolicy_MaskingException) Descriptor() ([]byte, []int) {
- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{11, 0}
+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{10, 0}
}
func (x *MaskingExceptionPolicy_MaskingException) GetAction() MaskingExceptionPolicy_MaskingException_Action {
@@ -1682,7 +1628,7 @@ type MaskingRulePolicy_MaskingRule struct {
func (x *MaskingRulePolicy_MaskingRule) Reset() {
*x = MaskingRulePolicy_MaskingRule{}
- mi := &file_v1_org_policy_service_proto_msgTypes[19]
+ mi := &file_v1_org_policy_service_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1694,7 +1640,7 @@ func (x *MaskingRulePolicy_MaskingRule) String() string {
func (*MaskingRulePolicy_MaskingRule) ProtoMessage() {}
func (x *MaskingRulePolicy_MaskingRule) ProtoReflect() protoreflect.Message {
- mi := &file_v1_org_policy_service_proto_msgTypes[19]
+ mi := &file_v1_org_policy_service_proto_msgTypes[18]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1707,7 +1653,7 @@ func (x *MaskingRulePolicy_MaskingRule) ProtoReflect() protoreflect.Message {
// Deprecated: Use MaskingRulePolicy_MaskingRule.ProtoReflect.Descriptor instead.
func (*MaskingRulePolicy_MaskingRule) Descriptor() ([]byte, []int) {
- return file_v1_org_policy_service_proto_rawDescGZIP(), []int{12, 0}
+ return file_v1_org_policy_service_proto_rawDescGZIP(), []int{11, 0}
}
func (x *MaskingRulePolicy_MaskingRule) GetId() string {
@@ -1762,13 +1708,12 @@ const file_v1_org_policy_service_proto_rawDesc = "" +
"\f_policy_type\"o\n" +
"\x14ListPoliciesResponse\x12/\n" +
"\bpolicies\x18\x01 \x03(\v2\x13.bytebase.v1.PolicyR\bpolicies\x12&\n" +
- "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xb0\t\n" +
+ "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xd1\b\n" +
"\x06Policy\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12.\n" +
"\x13inherit_from_parent\x18\x04 \x01(\bR\x11inheritFromParent\x12+\n" +
"\x04type\x18\x05 \x01(\x0e2\x17.bytebase.v1.PolicyTypeR\x04type\x12C\n" +
- "\x0erollout_policy\x18\x13 \x01(\v2\x1a.bytebase.v1.RolloutPolicyH\x00R\rrolloutPolicy\x12]\n" +
- "\x18disable_copy_data_policy\x18\x10 \x01(\v2\".bytebase.v1.DisableCopyDataPolicyH\x00R\x15disableCopyDataPolicy\x12P\n" +
+ "\x0erollout_policy\x18\x13 \x01(\v2\x1a.bytebase.v1.RolloutPolicyH\x00R\rrolloutPolicy\x12P\n" +
"\x13masking_rule_policy\x18\x11 \x01(\v2\x1e.bytebase.v1.MaskingRulePolicyH\x00R\x11maskingRulePolicy\x12_\n" +
"\x18masking_exception_policy\x18\x12 \x01(\v2#.bytebase.v1.MaskingExceptionPolicyH\x00R\x16maskingExceptionPolicy\x12\x96\x01\n" +
"-restrict_issue_creation_for_sql_review_policy\x18\x14 \x01(\v24.bytebase.v1.RestrictIssueCreationForSQLReviewPolicyH\x00R'restrictIssueCreationForSqlReviewPolicy\x127\n" +
@@ -1796,14 +1741,13 @@ const file_v1_org_policy_service_proto_rawDesc = "" +
"\n" +
"ERROR_ONLY\x10\x01\x12\n" +
"\n" +
- "\x06STRICT\x10\x02\"/\n" +
- "\x15DisableCopyDataPolicy\x12\x16\n" +
- "\x06active\x18\x01 \x01(\bR\x06active\"\xcd\x01\n" +
+ "\x06STRICT\x10\x02\"\xf9\x01\n" +
"\x0fQueryDataPolicy\x123\n" +
"\atimeout\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\atimeout\x12%\n" +
"\x0edisable_export\x18\x02 \x01(\bR\rdisableExport\x12.\n" +
"\x13maximum_result_size\x18\x03 \x01(\x03R\x11maximumResultSize\x12.\n" +
- "\x13maximum_result_rows\x18\x04 \x01(\x05R\x11maximumResultRows\"\xbb\x01\n" +
+ "\x13maximum_result_rows\x18\x04 \x01(\x05R\x11maximumResultRows\x12*\n" +
+ "\x11disable_copy_data\x18\x05 \x01(\bR\x0fdisableCopyData\"\xbb\x01\n" +
"\rSQLReviewRule\x12\x12\n" +
"\x04type\x18\x01 \x01(\tR\x04type\x125\n" +
"\x05level\x18\x02 \x01(\x0e2\x1f.bytebase.v1.SQLReviewRuleLevelR\x05level\x12\x18\n" +
@@ -1841,12 +1785,11 @@ const file_v1_org_policy_service_proto_rawDesc = "" +
"\vRestriction\x12\x1b\n" +
"\x17RESTRICTION_UNSPECIFIED\x10\x00\x12\f\n" +
"\bFALLBACK\x10\x01\x12\f\n" +
- "\bDISALLOW\x10\x02*\xfd\x01\n" +
+ "\bDISALLOW\x10\x02*\xe6\x01\n" +
"\n" +
"PolicyType\x12\x1b\n" +
"\x17POLICY_TYPE_UNSPECIFIED\x10\x00\x12\x12\n" +
- "\x0eROLLOUT_POLICY\x10\v\x12\x15\n" +
- "\x11DISABLE_COPY_DATA\x10\b\x12\x10\n" +
+ "\x0eROLLOUT_POLICY\x10\v\x12\x10\n" +
"\fMASKING_RULE\x10\t\x12\x15\n" +
"\x11MASKING_EXCEPTION\x10\n" +
"\x12*\n" +
@@ -1885,7 +1828,7 @@ func file_v1_org_policy_service_proto_rawDescGZIP() []byte {
}
var file_v1_org_policy_service_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
-var file_v1_org_policy_service_proto_msgTypes = make([]protoimpl.MessageInfo, 21)
+var file_v1_org_policy_service_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_v1_org_policy_service_proto_goTypes = []any{
(PolicyType)(0), // 0: bytebase.v1.PolicyType
(PolicyResourceType)(0), // 1: bytebase.v1.PolicyResourceType
@@ -1901,70 +1844,68 @@ var file_v1_org_policy_service_proto_goTypes = []any{
(*ListPoliciesResponse)(nil), // 11: bytebase.v1.ListPoliciesResponse
(*Policy)(nil), // 12: bytebase.v1.Policy
(*RolloutPolicy)(nil), // 13: bytebase.v1.RolloutPolicy
- (*DisableCopyDataPolicy)(nil), // 14: bytebase.v1.DisableCopyDataPolicy
- (*QueryDataPolicy)(nil), // 15: bytebase.v1.QueryDataPolicy
- (*SQLReviewRule)(nil), // 16: bytebase.v1.SQLReviewRule
- (*MaskingExceptionPolicy)(nil), // 17: bytebase.v1.MaskingExceptionPolicy
- (*MaskingRulePolicy)(nil), // 18: bytebase.v1.MaskingRulePolicy
- (*RestrictIssueCreationForSQLReviewPolicy)(nil), // 19: bytebase.v1.RestrictIssueCreationForSQLReviewPolicy
- (*TagPolicy)(nil), // 20: bytebase.v1.TagPolicy
- (*DataSourceQueryPolicy)(nil), // 21: bytebase.v1.DataSourceQueryPolicy
- (*RolloutPolicy_Checkers)(nil), // 22: bytebase.v1.RolloutPolicy.Checkers
- (*RolloutPolicy_Checkers_RequiredStatusChecks)(nil), // 23: bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks
- (*MaskingExceptionPolicy_MaskingException)(nil), // 24: bytebase.v1.MaskingExceptionPolicy.MaskingException
- (*MaskingRulePolicy_MaskingRule)(nil), // 25: bytebase.v1.MaskingRulePolicy.MaskingRule
- nil, // 26: bytebase.v1.TagPolicy.TagsEntry
- (*fieldmaskpb.FieldMask)(nil), // 27: google.protobuf.FieldMask
- (*durationpb.Duration)(nil), // 28: google.protobuf.Duration
- (Engine)(0), // 29: bytebase.v1.Engine
- (*expr.Expr)(nil), // 30: google.type.Expr
- (*emptypb.Empty)(nil), // 31: google.protobuf.Empty
+ (*QueryDataPolicy)(nil), // 14: bytebase.v1.QueryDataPolicy
+ (*SQLReviewRule)(nil), // 15: bytebase.v1.SQLReviewRule
+ (*MaskingExceptionPolicy)(nil), // 16: bytebase.v1.MaskingExceptionPolicy
+ (*MaskingRulePolicy)(nil), // 17: bytebase.v1.MaskingRulePolicy
+ (*RestrictIssueCreationForSQLReviewPolicy)(nil), // 18: bytebase.v1.RestrictIssueCreationForSQLReviewPolicy
+ (*TagPolicy)(nil), // 19: bytebase.v1.TagPolicy
+ (*DataSourceQueryPolicy)(nil), // 20: bytebase.v1.DataSourceQueryPolicy
+ (*RolloutPolicy_Checkers)(nil), // 21: bytebase.v1.RolloutPolicy.Checkers
+ (*RolloutPolicy_Checkers_RequiredStatusChecks)(nil), // 22: bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks
+ (*MaskingExceptionPolicy_MaskingException)(nil), // 23: bytebase.v1.MaskingExceptionPolicy.MaskingException
+ (*MaskingRulePolicy_MaskingRule)(nil), // 24: bytebase.v1.MaskingRulePolicy.MaskingRule
+ nil, // 25: bytebase.v1.TagPolicy.TagsEntry
+ (*fieldmaskpb.FieldMask)(nil), // 26: google.protobuf.FieldMask
+ (*durationpb.Duration)(nil), // 27: google.protobuf.Duration
+ (Engine)(0), // 28: bytebase.v1.Engine
+ (*expr.Expr)(nil), // 29: google.type.Expr
+ (*emptypb.Empty)(nil), // 30: google.protobuf.Empty
}
var file_v1_org_policy_service_proto_depIdxs = []int32{
12, // 0: bytebase.v1.CreatePolicyRequest.policy:type_name -> bytebase.v1.Policy
0, // 1: bytebase.v1.CreatePolicyRequest.type:type_name -> bytebase.v1.PolicyType
12, // 2: bytebase.v1.UpdatePolicyRequest.policy:type_name -> bytebase.v1.Policy
- 27, // 3: bytebase.v1.UpdatePolicyRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 26, // 3: bytebase.v1.UpdatePolicyRequest.update_mask:type_name -> google.protobuf.FieldMask
0, // 4: bytebase.v1.ListPoliciesRequest.policy_type:type_name -> bytebase.v1.PolicyType
12, // 5: bytebase.v1.ListPoliciesResponse.policies:type_name -> bytebase.v1.Policy
0, // 6: bytebase.v1.Policy.type:type_name -> bytebase.v1.PolicyType
13, // 7: bytebase.v1.Policy.rollout_policy:type_name -> bytebase.v1.RolloutPolicy
- 14, // 8: bytebase.v1.Policy.disable_copy_data_policy:type_name -> bytebase.v1.DisableCopyDataPolicy
- 18, // 9: bytebase.v1.Policy.masking_rule_policy:type_name -> bytebase.v1.MaskingRulePolicy
- 17, // 10: bytebase.v1.Policy.masking_exception_policy:type_name -> bytebase.v1.MaskingExceptionPolicy
- 19, // 11: bytebase.v1.Policy.restrict_issue_creation_for_sql_review_policy:type_name -> bytebase.v1.RestrictIssueCreationForSQLReviewPolicy
- 20, // 12: bytebase.v1.Policy.tag_policy:type_name -> bytebase.v1.TagPolicy
- 21, // 13: bytebase.v1.Policy.data_source_query_policy:type_name -> bytebase.v1.DataSourceQueryPolicy
- 15, // 14: bytebase.v1.Policy.query_data_policy:type_name -> bytebase.v1.QueryDataPolicy
- 1, // 15: bytebase.v1.Policy.resource_type:type_name -> bytebase.v1.PolicyResourceType
- 22, // 16: bytebase.v1.RolloutPolicy.checkers:type_name -> bytebase.v1.RolloutPolicy.Checkers
- 28, // 17: bytebase.v1.QueryDataPolicy.timeout:type_name -> google.protobuf.Duration
- 2, // 18: bytebase.v1.SQLReviewRule.level:type_name -> bytebase.v1.SQLReviewRuleLevel
- 29, // 19: bytebase.v1.SQLReviewRule.engine:type_name -> bytebase.v1.Engine
- 24, // 20: bytebase.v1.MaskingExceptionPolicy.masking_exceptions:type_name -> bytebase.v1.MaskingExceptionPolicy.MaskingException
- 25, // 21: bytebase.v1.MaskingRulePolicy.rules:type_name -> bytebase.v1.MaskingRulePolicy.MaskingRule
- 26, // 22: bytebase.v1.TagPolicy.tags:type_name -> bytebase.v1.TagPolicy.TagsEntry
- 5, // 23: bytebase.v1.DataSourceQueryPolicy.admin_data_source_restriction:type_name -> bytebase.v1.DataSourceQueryPolicy.Restriction
- 23, // 24: bytebase.v1.RolloutPolicy.Checkers.required_status_checks:type_name -> bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks
- 3, // 25: bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks.plan_check_enforcement:type_name -> bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement
- 4, // 26: bytebase.v1.MaskingExceptionPolicy.MaskingException.action:type_name -> bytebase.v1.MaskingExceptionPolicy.MaskingException.Action
- 30, // 27: bytebase.v1.MaskingExceptionPolicy.MaskingException.condition:type_name -> google.type.Expr
- 30, // 28: bytebase.v1.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr
- 9, // 29: bytebase.v1.OrgPolicyService.GetPolicy:input_type -> bytebase.v1.GetPolicyRequest
- 10, // 30: bytebase.v1.OrgPolicyService.ListPolicies:input_type -> bytebase.v1.ListPoliciesRequest
- 6, // 31: bytebase.v1.OrgPolicyService.CreatePolicy:input_type -> bytebase.v1.CreatePolicyRequest
- 7, // 32: bytebase.v1.OrgPolicyService.UpdatePolicy:input_type -> bytebase.v1.UpdatePolicyRequest
- 8, // 33: bytebase.v1.OrgPolicyService.DeletePolicy:input_type -> bytebase.v1.DeletePolicyRequest
- 12, // 34: bytebase.v1.OrgPolicyService.GetPolicy:output_type -> bytebase.v1.Policy
- 11, // 35: bytebase.v1.OrgPolicyService.ListPolicies:output_type -> bytebase.v1.ListPoliciesResponse
- 12, // 36: bytebase.v1.OrgPolicyService.CreatePolicy:output_type -> bytebase.v1.Policy
- 12, // 37: bytebase.v1.OrgPolicyService.UpdatePolicy:output_type -> bytebase.v1.Policy
- 31, // 38: bytebase.v1.OrgPolicyService.DeletePolicy:output_type -> google.protobuf.Empty
- 34, // [34:39] is the sub-list for method output_type
- 29, // [29:34] is the sub-list for method input_type
- 29, // [29:29] is the sub-list for extension type_name
- 29, // [29:29] is the sub-list for extension extendee
- 0, // [0:29] is the sub-list for field type_name
+ 17, // 8: bytebase.v1.Policy.masking_rule_policy:type_name -> bytebase.v1.MaskingRulePolicy
+ 16, // 9: bytebase.v1.Policy.masking_exception_policy:type_name -> bytebase.v1.MaskingExceptionPolicy
+ 18, // 10: bytebase.v1.Policy.restrict_issue_creation_for_sql_review_policy:type_name -> bytebase.v1.RestrictIssueCreationForSQLReviewPolicy
+ 19, // 11: bytebase.v1.Policy.tag_policy:type_name -> bytebase.v1.TagPolicy
+ 20, // 12: bytebase.v1.Policy.data_source_query_policy:type_name -> bytebase.v1.DataSourceQueryPolicy
+ 14, // 13: bytebase.v1.Policy.query_data_policy:type_name -> bytebase.v1.QueryDataPolicy
+ 1, // 14: bytebase.v1.Policy.resource_type:type_name -> bytebase.v1.PolicyResourceType
+ 21, // 15: bytebase.v1.RolloutPolicy.checkers:type_name -> bytebase.v1.RolloutPolicy.Checkers
+ 27, // 16: bytebase.v1.QueryDataPolicy.timeout:type_name -> google.protobuf.Duration
+ 2, // 17: bytebase.v1.SQLReviewRule.level:type_name -> bytebase.v1.SQLReviewRuleLevel
+ 28, // 18: bytebase.v1.SQLReviewRule.engine:type_name -> bytebase.v1.Engine
+ 23, // 19: bytebase.v1.MaskingExceptionPolicy.masking_exceptions:type_name -> bytebase.v1.MaskingExceptionPolicy.MaskingException
+ 24, // 20: bytebase.v1.MaskingRulePolicy.rules:type_name -> bytebase.v1.MaskingRulePolicy.MaskingRule
+ 25, // 21: bytebase.v1.TagPolicy.tags:type_name -> bytebase.v1.TagPolicy.TagsEntry
+ 5, // 22: bytebase.v1.DataSourceQueryPolicy.admin_data_source_restriction:type_name -> bytebase.v1.DataSourceQueryPolicy.Restriction
+ 22, // 23: bytebase.v1.RolloutPolicy.Checkers.required_status_checks:type_name -> bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks
+ 3, // 24: bytebase.v1.RolloutPolicy.Checkers.RequiredStatusChecks.plan_check_enforcement:type_name -> bytebase.v1.RolloutPolicy.Checkers.PlanCheckEnforcement
+ 4, // 25: bytebase.v1.MaskingExceptionPolicy.MaskingException.action:type_name -> bytebase.v1.MaskingExceptionPolicy.MaskingException.Action
+ 29, // 26: bytebase.v1.MaskingExceptionPolicy.MaskingException.condition:type_name -> google.type.Expr
+ 29, // 27: bytebase.v1.MaskingRulePolicy.MaskingRule.condition:type_name -> google.type.Expr
+ 9, // 28: bytebase.v1.OrgPolicyService.GetPolicy:input_type -> bytebase.v1.GetPolicyRequest
+ 10, // 29: bytebase.v1.OrgPolicyService.ListPolicies:input_type -> bytebase.v1.ListPoliciesRequest
+ 6, // 30: bytebase.v1.OrgPolicyService.CreatePolicy:input_type -> bytebase.v1.CreatePolicyRequest
+ 7, // 31: bytebase.v1.OrgPolicyService.UpdatePolicy:input_type -> bytebase.v1.UpdatePolicyRequest
+ 8, // 32: bytebase.v1.OrgPolicyService.DeletePolicy:input_type -> bytebase.v1.DeletePolicyRequest
+ 12, // 33: bytebase.v1.OrgPolicyService.GetPolicy:output_type -> bytebase.v1.Policy
+ 11, // 34: bytebase.v1.OrgPolicyService.ListPolicies:output_type -> bytebase.v1.ListPoliciesResponse
+ 12, // 35: bytebase.v1.OrgPolicyService.CreatePolicy:output_type -> bytebase.v1.Policy
+ 12, // 36: bytebase.v1.OrgPolicyService.UpdatePolicy:output_type -> bytebase.v1.Policy
+ 30, // 37: bytebase.v1.OrgPolicyService.DeletePolicy:output_type -> google.protobuf.Empty
+ 33, // [33:38] is the sub-list for method output_type
+ 28, // [28:33] is the sub-list for method input_type
+ 28, // [28:28] is the sub-list for extension type_name
+ 28, // [28:28] is the sub-list for extension extendee
+ 0, // [0:28] is the sub-list for field type_name
}
func init() { file_v1_org_policy_service_proto_init() }
@@ -1977,7 +1918,6 @@ func file_v1_org_policy_service_proto_init() {
file_v1_org_policy_service_proto_msgTypes[4].OneofWrappers = []any{}
file_v1_org_policy_service_proto_msgTypes[6].OneofWrappers = []any{
(*Policy_RolloutPolicy)(nil),
- (*Policy_DisableCopyDataPolicy)(nil),
(*Policy_MaskingRulePolicy)(nil),
(*Policy_MaskingExceptionPolicy)(nil),
(*Policy_RestrictIssueCreationForSqlReviewPolicy)(nil),
@@ -1991,7 +1931,7 @@ func file_v1_org_policy_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_org_policy_service_proto_rawDesc), len(file_v1_org_policy_service_proto_rawDesc)),
NumEnums: 6,
- NumMessages: 21,
+ NumMessages: 20,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/backend/generated-go/v1/org_policy_service_equal.pb.go b/backend/generated-go/v1/org_policy_service_equal.pb.go
index bf7fcdfcda..3bfa1977aa 100644
--- a/backend/generated-go/v1/org_policy_service_equal.pb.go
+++ b/backend/generated-go/v1/org_policy_service_equal.pb.go
@@ -142,9 +142,6 @@ func (x *Policy) Equal(y *Policy) bool {
if !x.GetRolloutPolicy().Equal(y.GetRolloutPolicy()) {
return false
}
- if !x.GetDisableCopyDataPolicy().Equal(y.GetDisableCopyDataPolicy()) {
- return false
- }
if !x.GetMaskingRulePolicy().Equal(y.GetMaskingRulePolicy()) {
return false
}
@@ -172,6 +169,35 @@ func (x *Policy) Equal(y *Policy) bool {
return true
}
+func (x *RolloutPolicy_Checkers_RequiredStatusChecks) Equal(y *RolloutPolicy_Checkers_RequiredStatusChecks) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.PlanCheckEnforcement != y.PlanCheckEnforcement {
+ return false
+ }
+ return true
+}
+
+func (x *RolloutPolicy_Checkers) Equal(y *RolloutPolicy_Checkers) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.RequiredIssueApproval != y.RequiredIssueApproval {
+ return false
+ }
+ if !x.RequiredStatusChecks.Equal(y.RequiredStatusChecks) {
+ return false
+ }
+ return true
+}
+
func (x *RolloutPolicy) Equal(y *RolloutPolicy) bool {
if x == y {
return true
@@ -198,17 +224,7 @@ func (x *RolloutPolicy) Equal(y *RolloutPolicy) bool {
return false
}
}
- return true
-}
-
-func (x *DisableCopyDataPolicy) Equal(y *DisableCopyDataPolicy) bool {
- if x == y {
- return true
- }
- if x == nil || y == nil {
- return x == nil && y == nil
- }
- if x.Active != y.Active {
+ if !x.Checkers.Equal(y.Checkers) {
return false
}
return true
@@ -233,6 +249,9 @@ func (x *QueryDataPolicy) Equal(y *QueryDataPolicy) bool {
if x.MaximumResultRows != y.MaximumResultRows {
return false
}
+ if x.DisableCopyData != y.DisableCopyData {
+ return false
+ }
return true
}
diff --git a/backend/migrator/migration/3.10/0004##migrate_disable_copy_data_policy.sql b/backend/migrator/migration/3.10/0004##migrate_disable_copy_data_policy.sql
new file mode 100644
index 0000000000..9865139bba
--- /dev/null
+++ b/backend/migrator/migration/3.10/0004##migrate_disable_copy_data_policy.sql
@@ -0,0 +1,46 @@
+-- Migrate DISABLE_COPY_DATA policies to QUERY_DATA policies with disable_copy_data field
+-- This migration converts the deprecated DISABLE_COPY_DATA policy type to QUERY_DATA
+
+-- First, handle any existing QUERY_DATA policies for resources that also have DISABLE_COPY_DATA
+-- We need to merge them by adding the disable_copy_data field
+UPDATE policy p1
+SET
+ payload = jsonb_set(
+ COALESCE(p1.payload, '{}'::jsonb),
+ '{disableCopyData}',
+ COALESCE((
+ SELECT p2.payload->'active'
+ FROM policy p2
+ WHERE p2.resource = p1.resource
+ AND p2.type = 'DISABLE_COPY_DATA'
+ LIMIT 1
+ ), 'false'::jsonb)
+ ),
+ updated_at = NOW()
+WHERE p1.type = 'QUERY_DATA'
+ AND EXISTS (
+ SELECT 1
+ FROM policy p2
+ WHERE p2.resource = p1.resource
+ AND p2.type = 'DISABLE_COPY_DATA'
+ );
+
+-- Delete the now-redundant DISABLE_COPY_DATA policies that were merged
+DELETE FROM policy
+WHERE type = 'DISABLE_COPY_DATA'
+ AND resource IN (
+ SELECT resource
+ FROM policy
+ WHERE type = 'QUERY_DATA'
+ );
+
+-- Convert remaining DISABLE_COPY_DATA policies to QUERY_DATA
+UPDATE policy
+SET
+ type = 'QUERY_DATA',
+ payload = jsonb_build_object(
+ 'disableCopyData',
+ COALESCE(payload->'active', 'false'::jsonb)
+ ),
+ updated_at = NOW()
+WHERE type = 'DISABLE_COPY_DATA';
\ No newline at end of file
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index 7eb55e590f..6f38418ca6 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -12,7 +12,7 @@ import (
func TestLatestVersion(t *testing.T) {
files, err := getSortedVersionedFiles()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("3.10.3"), *files[len(files)-1].version)
+ require.Equal(t, semver.MustParse("3.10.4"), *files[len(files)-1].version)
}
func TestVersionUnique(t *testing.T) {
diff --git a/backend/plugin/advisor/utils_for_tests.go b/backend/plugin/advisor/utils_for_tests.go
index ef1aa69063..97481ac4e6 100644
--- a/backend/plugin/advisor/utils_for_tests.go
+++ b/backend/plugin/advisor/utils_for_tests.go
@@ -403,9 +403,7 @@ func SetDefaultSQLReviewRulePayload(ruleTp SQLReviewRuleType, dbType storepb.Eng
payload, err = json.Marshal(NamingRulePayload{
Format: "_delete$",
})
- case SchemaRuleTableNaming:
- fallthrough
- case SchemaRuleColumnNaming:
+ case SchemaRuleTableNaming, SchemaRuleColumnNaming:
format := "^[a-z]+(_[a-z]+)*$"
maxLength := 64
switch dbType {
diff --git a/backend/plugin/parser/errors/resources.go b/backend/plugin/parser/errors/resources.go
index c93194e03f..a4be2c4b20 100644
--- a/backend/plugin/parser/errors/resources.go
+++ b/backend/plugin/parser/errors/resources.go
@@ -1,4 +1,4 @@
-package parser
+package errors
import (
"fmt"
diff --git a/backend/plugin/parser/pg/legacy/convert.go b/backend/plugin/parser/pg/legacy/convert.go
index 3aafcd3e6f..c1967c2fe5 100644
--- a/backend/plugin/parser/pg/legacy/convert.go
+++ b/backend/plugin/parser/pg/legacy/convert.go
@@ -1,4 +1,4 @@
-package pg
+package legacy
import (
"fmt"
diff --git a/backend/plugin/parser/pg/legacy/convert_test.go b/backend/plugin/parser/pg/legacy/convert_test.go
index 4449a2f6c8..199ee40adc 100644
--- a/backend/plugin/parser/pg/legacy/convert_test.go
+++ b/backend/plugin/parser/pg/legacy/convert_test.go
@@ -1,4 +1,4 @@
-package pg
+package legacy
import (
"encoding/json"
diff --git a/backend/plugin/parser/pg/legacy/data_type_test.go b/backend/plugin/parser/pg/legacy/data_type_test.go
index 4cfa7e6f0b..c87462429f 100644
--- a/backend/plugin/parser/pg/legacy/data_type_test.go
+++ b/backend/plugin/parser/pg/legacy/data_type_test.go
@@ -1,4 +1,4 @@
-package pg
+package legacy
import (
"fmt"
diff --git a/backend/plugin/parser/pg/legacy/deparse.go b/backend/plugin/parser/pg/legacy/deparse.go
index 2a5c430ffa..ea2324d605 100644
--- a/backend/plugin/parser/pg/legacy/deparse.go
+++ b/backend/plugin/parser/pg/legacy/deparse.go
@@ -1,4 +1,4 @@
-package pg
+package legacy
import (
"fmt"
diff --git a/backend/plugin/parser/pg/legacy/deparse_test.go b/backend/plugin/parser/pg/legacy/deparse_test.go
index 6e36cbabb5..082b333a72 100644
--- a/backend/plugin/parser/pg/legacy/deparse_test.go
+++ b/backend/plugin/parser/pg/legacy/deparse_test.go
@@ -1,4 +1,4 @@
-package pg
+package legacy
import (
"io"
diff --git a/backend/plugin/parser/pg/legacy/error.go b/backend/plugin/parser/pg/legacy/error.go
index fcdb4fe414..88b5ddc873 100644
--- a/backend/plugin/parser/pg/legacy/error.go
+++ b/backend/plugin/parser/pg/legacy/error.go
@@ -1,4 +1,4 @@
-package pg
+package legacy
import "github.com/pkg/errors"
diff --git a/backend/plugin/parser/pg/legacy/parser.go b/backend/plugin/parser/pg/legacy/parser.go
index a929be10f1..ee83934f7b 100644
--- a/backend/plugin/parser/pg/legacy/parser.go
+++ b/backend/plugin/parser/pg/legacy/parser.go
@@ -1,5 +1,5 @@
-// Package pg implements the parser for PostgreSQL.
-package pg
+// Package legacy implements the parser for PostgreSQL.
+package legacy
import (
"strings"
diff --git a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
index 11873efad4..62091a7e39 100644
--- a/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
+++ b/frontend/src/components/EnvironmentForm/AccessControlConfigure.vue
@@ -8,7 +8,7 @@
<div>
<div class="w-full inline-flex items-center gap-x-2">
<Switch
- v-model:value="state.disableCopyDataPolicy.active"
+ v-model:value="state.queryDataPolicy.disableCopyData"
:text="true"
:disabled="!allowUpdatePolicy || !hasRestrictCopyingDataFeature"
/>
@@ -106,12 +106,12 @@ import { hasFeature, usePolicyV1Store } from "@/store";
import { environmentNamePrefix } from "@/store/modules/v1/common";
import type {
DataSourceQueryPolicy,
- DisableCopyDataPolicy,
+ QueryDataPolicy,
} from "@/types/proto-es/v1/org_policy_service_pb";
import {
DataSourceQueryPolicySchema,
DataSourceQueryPolicy_Restriction,
- DisableCopyDataPolicySchema,
+ QueryDataPolicySchema,
PolicyType,
} from "@/types/proto-es/v1/org_policy_service_pb";
import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
@@ -120,7 +120,7 @@ import { FeatureBadge } from "../FeatureGuard";
import { Switch } from "../v2";
interface LocalState {
- disableCopyDataPolicy: DisableCopyDataPolicy;
+ queryDataPolicy: QueryDataPolicy;
dataSourceQueryPolicy: DataSourceQueryPolicy;
}
@@ -133,15 +133,15 @@ const policyStore = usePolicyV1Store();
const getInitialState = (): LocalState => {
return {
- disableCopyDataPolicy: (() => {
+ queryDataPolicy: (() => {
const policy = policyStore.getPolicyByParentAndType({
parentPath: props.resource,
- policyType: PolicyType.DISABLE_COPY_DATA,
+ policyType: PolicyType.DATA_QUERY,
});
- if (policy?.policy.case === "disableCopyDataPolicy") {
+ if (policy?.policy.case === "queryDataPolicy") {
return cloneDeep(policy.policy.value);
}
- return createProto(DisableCopyDataPolicySchema, {});
+ return createProto(QueryDataPolicySchema, {});
})(),
dataSourceQueryPolicy: (() => {
const policy = policyStore.getPolicyByParentAndType({
@@ -162,7 +162,7 @@ watchEffect(async () => {
await Promise.all([
policyStore.getOrFetchPolicyByParentAndType({
parentPath: props.resource,
- policyType: PolicyType.DISABLE_COPY_DATA,
+ policyType: PolicyType.DATA_QUERY,
}),
policyStore.getOrFetchPolicyByParentAndType({
parentPath: props.resource,
@@ -199,15 +199,15 @@ const allowUpdatePolicy = computed(() => {
return props.allowEdit && hasWorkspacePermissionV2("bb.policies.update");
});
-const updateDisableCopyDataPolicy = async () => {
+const updateQueryDataPolicy = async () => {
await policyStore.upsertPolicy({
parentPath: props.resource,
policy: {
- type: PolicyType.DISABLE_COPY_DATA,
+ type: PolicyType.DATA_QUERY,
policy: {
- case: "disableCopyDataPolicy",
+ case: "queryDataPolicy",
value: {
- ...state.disableCopyDataPolicy,
+ ...state.queryDataPolicy,
},
},
},
@@ -244,10 +244,8 @@ defineExpose({
) {
await updateAdminDataSourceQueryRestrctionPolicy();
}
- if (
- !isEqual(state.disableCopyDataPolicy, initialState.disableCopyDataPolicy)
- ) {
- await updateDisableCopyDataPolicy();
+ if (!isEqual(state.queryDataPolicy, initialState.queryDataPolicy)) {
+ await updateQueryDataPolicy();
}
},
revert: () => {
diff --git a/frontend/src/store/modules/v1/policy.ts b/frontend/src/store/modules/v1/policy.ts
index 7e5ec1c1d6..aead369bbc 100644
--- a/frontend/src/store/modules/v1/policy.ts
+++ b/frontend/src/store/modules/v1/policy.ts
@@ -243,8 +243,6 @@ const getUpdateMaskFromPolicyType = (policyType: PolicyType) => {
return [PolicySchema.field.queryDataPolicy.name];
case PolicyType.DATA_SOURCE_QUERY:
return [PolicySchema.field.dataSourceQueryPolicy.name];
- case PolicyType.DISABLE_COPY_DATA:
- return [PolicySchema.field.disableCopyDataPolicy.name];
case PolicyType.RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW:
return [PolicySchema.field.restrictIssueCreationForSqlReviewPolicy.name];
case PolicyType.TAG:
diff --git a/frontend/src/types/proto-es/v1/org_policy_service_pb.d.ts b/frontend/src/types/proto-es/v1/org_policy_service_pb.d.ts
index 741442e8bf..55926f7565 100644
--- a/frontend/src/types/proto-es/v1/org_policy_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/org_policy_service_pb.d.ts
@@ -244,12 +244,6 @@ export declare type Policy = Message<"bytebase.v1.Policy"> & {
*/
value: RolloutPolicy;
case: "rolloutPolicy";
- } | {
- /**
- * @generated from field: bytebase.v1.DisableCopyDataPolicy disable_copy_data_policy = 16;
- */
- value: DisableCopyDataPolicy;
- case: "disableCopyDataPolicy";
} | {
/**
* @generated from field: bytebase.v1.MaskingRulePolicy masking_rule_policy = 17;
@@ -420,22 +414,6 @@ export enum RolloutPolicy_Checkers_PlanCheckEnforcement {
*/
export declare const RolloutPolicy_Checkers_PlanCheckEnforcementSchema: GenEnum<RolloutPolicy_Checkers_PlanCheckEnforcement>;
-/**
- * @generated from message bytebase.v1.DisableCopyDataPolicy
- */
-export declare type DisableCopyDataPolicy = Message<"bytebase.v1.DisableCopyDataPolicy"> & {
- /**
- * @generated from field: bool active = 1;
- */
- active: boolean;
-};
-
-/**
- * Describes the message bytebase.v1.DisableCopyDataPolicy.
- * Use `create(DisableCopyDataPolicySchema)` to create a new message.
- */
-export declare const DisableCopyDataPolicySchema: GenMessage<DisableCopyDataPolicy>;
-
/**
* QueryDataPolicy is the policy configuration for querying data.
*
@@ -471,6 +449,13 @@ export declare type QueryDataPolicy = Message<"bytebase.v1.QueryDataPolicy"> & {
* @generated from field: int32 maximum_result_rows = 4;
*/
maximumResultRows: number;
+
+ /**
+ * Disable copying data.
+ *
+ * @generated from field: bool disable_copy_data = 5;
+ */
+ disableCopyData: boolean;
};
/**
@@ -790,11 +775,6 @@ export enum PolicyType {
*/
ROLLOUT_POLICY = 11,
- /**
- * @generated from enum value: DISABLE_COPY_DATA = 8;
- */
- DISABLE_COPY_DATA = 8,
-
/**
* @generated from enum value: MASKING_RULE = 9;
*/
diff --git a/frontend/src/types/proto-es/v1/org_policy_service_pb.js b/frontend/src/types/proto-es/v1/org_policy_service_pb.js
index 5716dee1ca..d740d0c702 100644
--- a/frontend/src/types/proto-es/v1/org_policy_service_pb.js
+++ b/frontend/src/types/proto-es/v1/org_policy_service_pb.js
@@ -16,7 +16,7 @@ import { file_v1_common } from "./common_pb";
* Describes the file v1/org_policy_service.proto.
*/
export const file_v1_org_policy_service = /*@__PURE__*/
- fileDesc("Cht2MS9vcmdfcG9saWN5X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIpMBChNDcmVhdGVQb2xpY3lSZXF1ZXN0EisKBnBhcmVudBgBIAEoCUIb4EEC+kEVEhNieXRlYmFzZS5jb20vUG9saWN5EigKBnBvbGljeRgCIAEoCzITLmJ5dGViYXNlLnYxLlBvbGlj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TIrL3YxL3twb2xpY3kubmFtZT1lbnZpcm9ubWVudHMvKi9wb2xpY2llcy8qfVoyOgZwb2xpY3kyKC92MS97cG9saWN5Lm5hbWU9aW5zdGFuY2VzLyovcG9saWNpZXMvKn1aPjoGcG9saWN5MjQvdjEve3BvbGljeS5uYW1lPWluc3RhbmNlcy8qL2RhdGFiYXNlcy8qL3BvbGljaWVzLyp9MhwvdjEve3BvbGljeS5uYW1lPXBvbGljaWVzLyp9ErACCgxEZWxldGVQb2xpY3kSIC5ieXRlYmFzZS52MS5EZWxldGVQb2xpY3lSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IuUB2kEEbmFtZYrqMBJiYi5wb2xpY2llcy5kZWxldGWQ6jABmOowAYLT5JMCuQFaIiogL3YxL3tuYW1lPXByb2plY3RzLyovcG9saWNpZXMvKn1aJiokL3YxL3tuYW1lPWVudmlyb25tZW50cy8qL3BvbGljaWVzLyp9WiMqIS92MS97bmFtZT1pbnN0YW5jZXMvKi9wb2xpY2llcy8qfVovKi0vdjEve25hbWU9aW5zdGFuY2VzLyovZGF0YWJhc2VzLyovcG9saWNpZXMvKn0qFS92MS97bmFtZT1wb2xpY2llcy8qfUI2WjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common]);
+ fileDesc("Cht2MS9vcmdfcG9saWN5X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIpMBChNDcmVhdGVQb2xpY3lSZXF1ZXN0EisKBnBhcmVudBgBIAEoCUIb4EEC+kEVEhNieXRlYmFzZS5jb20vUG9saWN5EigKBnBvbGljeRgCIAEoCzITLmJ5dGViYXNlLnYxLlBvbGljeUID4EECEiUKBHR5cGUYAyABKA4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VzLyovZGF0YWJhc2VzLyovcG9saWNpZXMvKn0yHC92MS97cG9saWN5Lm5hbWU9cG9saWNpZXMvKn0SsAIKDERlbGV0ZVBvbGljeRIgLmJ5dGViYXNlLnYxLkRlbGV0ZVBvbGljeVJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHki5QHaQQRuYW1liuowEmJiLnBvbGljaWVzLmRlbGV0ZZDqMAGY6jABgtPkkwK5AVoiKiAvdjEve25hbWU9cHJvamVjdHMvKi9wb2xpY2llcy8qfVomKiQvdjEve25hbWU9ZW52aXJvbm1lbnRzLyovcG9saWNpZXMvKn1aIyohL3YxL3tuYW1lPWluc3RhbmNlcy8qL3BvbGljaWVzLyp9Wi8qLS92MS97bmFtZT1pbnN0YW5jZXMvKi9kYXRhYmFzZXMvKi9wb2xpY2llcy8qfSoVL3YxL3tuYW1lPXBvbGljaWVzLyp9QjZaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common]);
/**
* Describes the message bytebase.v1.CreatePolicyRequest.
@@ -100,46 +100,39 @@ export const RolloutPolicy_Checkers_PlanCheckEnforcementSchema = /*@__PURE__*/
export const RolloutPolicy_Checkers_PlanCheckEnforcement = /*@__PURE__*/
tsEnum(RolloutPolicy_Checkers_PlanCheckEnforcementSchema);
-/**
- * Describes the message bytebase.v1.DisableCopyDataPolicy.
- * Use `create(DisableCopyDataPolicySchema)` to create a new message.
- */
-export const DisableCopyDataPolicySchema = /*@__PURE__*/
- messageDesc(file_v1_org_policy_service, 8);
-
/**
* Describes the message bytebase.v1.QueryDataPolicy.
* Use `create(QueryDataPolicySchema)` to create a new message.
*/
export const QueryDataPolicySchema = /*@__PURE__*/
- messageDesc(file_v1_org_policy_service, 9);
+ messageDesc(file_v1_org_policy_service, 8);
/**
* Describes the message bytebase.v1.SQLReviewRule.
* Use `create(SQLReviewRuleSchema)` to create a new message.
*/
export const SQLReviewRuleSchema = /*@__PURE__*/
- messageDesc(file_v1_org_policy_service, 10);
+ messageDesc(file_v1_org_policy_service, 9);
/**
* Describes the message bytebase.v1.MaskingExceptionPolicy.
* Use `create(MaskingExceptionPolicySchema)` to create a new message.
*/
export const MaskingExceptionPolicySchema = /*@__PURE__*/
- messageDesc(file_v1_org_policy_service, 11);
+ messageDesc(file_v1_org_policy_service, 10);
/**
* Describes the message bytebase.v1.MaskingExceptionPolicy.MaskingException.
* Use `create(MaskingExceptionPolicy_MaskingExceptionSchema)` to create a new message.
*/
export const MaskingExceptionPolicy_MaskingExceptionSchema = /*@__PURE__*/
- messageDesc(file_v1_org_policy_service, 11, 0);
+ messageDesc(file_v1_org_policy_service, 10, 0);
/**
* Describes the enum bytebase.v1.MaskingExceptionPolicy.MaskingException.Action.
*/
export const MaskingExceptionPolicy_MaskingException_ActionSchema = /*@__PURE__*/
- enumDesc(file_v1_org_policy_service, 11, 0, 0);
+ enumDesc(file_v1_org_policy_service, 10, 0, 0);
/**
* @generated from enum bytebase.v1.MaskingExceptionPolicy.MaskingException.Action
@@ -152,41 +145,41 @@ export const MaskingExceptionPolicy_MaskingException_Action = /*@__PURE__*/
* Use `create(MaskingRulePolicySchema)` to create a new message.
*/
export const MaskingRulePolicySchema = /*@__PURE__*/
- messageDesc(file_v1_org_policy_service, 12);
+ messageDesc(file_v1_org_policy_service, 11);
/**
* Describes the message bytebase.v1.MaskingRulePolicy.MaskingRule.
* Use `create(MaskingRulePolicy_MaskingRuleSchema)` to create a new message.
*/
export const MaskingRulePolicy_MaskingRuleSchema = /*@__PURE__*/
- messageDesc(file_v1_org_policy_service, 12, 0);
+ messageDesc(file_v1_org_policy_service, 11, 0);
/**
* Describes the message bytebase.v1.RestrictIssueCreationForSQLReviewPolicy.
* Use `create(RestrictIssueCreationForSQLReviewPolicySchema)` to create a new message.
*/
export const RestrictIssueCreationForSQLReviewPolicySchema = /*@__PURE__*/
- messageDesc(file_v1_org_policy_service, 13);
+ messageDesc(file_v1_org_policy_service, 12);
/**
* Describes the message bytebase.v1.TagPolicy.
* Use `create(TagPolicySchema)` to create a new message.
*/
export const TagPolicySchema = /*@__PURE__*/
- messageDesc(file_v1_org_policy_service, 14);
+ messageDesc(file_v1_org_policy_service, 13);
/**
* Describes the message bytebase.v1.DataSourceQueryPolicy.
* Use `create(DataSourceQueryPolicySchema)` to create a new message.
*/
export const DataSourceQueryPolicySchema = /*@__PURE__*/
- messageDesc(file_v1_org_policy_service, 15);
+ messageDesc(file_v1_org_policy_service, 14);
/**
* Describes the enum bytebase.v1.DataSourceQueryPolicy.Restriction.
*/
export const DataSourceQueryPolicy_RestrictionSchema = /*@__PURE__*/
- enumDesc(file_v1_org_policy_service, 15, 0);
+ enumDesc(file_v1_org_policy_service, 14, 0);
/**
* @generated from enum bytebase.v1.DataSourceQueryPolicy.Restriction
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue
index b94553c394..3bccd9dd7f 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue
@@ -244,11 +244,11 @@ const disallowCopyingData = computed(() => {
if (props.database) {
const projectLevelPolicy = policyStore.getPolicyByParentAndType({
parentPath: props.database?.project,
- policyType: PolicyType.DISABLE_COPY_DATA,
+ policyType: PolicyType.DATA_QUERY,
});
if (
- projectLevelPolicy?.policy?.case === "disableCopyDataPolicy" &&
- projectLevelPolicy.policy.value.active
+ projectLevelPolicy?.policy?.case === "queryDataPolicy" &&
+ projectLevelPolicy.policy.value.disableCopyData
) {
return true;
}
@@ -260,11 +260,11 @@ const disallowCopyingData = computed(() => {
if (environment) {
const policy = policyStore.getPolicyByParentAndType({
parentPath: environment,
- policyType: PolicyType.DISABLE_COPY_DATA,
+ policyType: PolicyType.DATA_QUERY,
});
if (
- policy?.policy?.case === "disableCopyDataPolicy" &&
- policy.policy.value.active
+ policy?.policy?.case === "queryDataPolicy" &&
+ policy.policy.value.disableCopyData
) {
return true;
}
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 9bff0be591..5ca9eb664e 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -314,7 +314,6 @@ paths:
enum:
- POLICY_TYPE_UNSPECIFIED
- ROLLOUT_POLICY
- - DISABLE_COPY_DATA
- MASKING_RULE
- MASKING_EXCEPTION
- RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW
@@ -381,7 +380,6 @@ paths:
enum:
- POLICY_TYPE_UNSPECIFIED
- ROLLOUT_POLICY
- - DISABLE_COPY_DATA
- MASKING_RULE
- MASKING_EXCEPTION
- RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW
@@ -1679,7 +1677,6 @@ paths:
enum:
- POLICY_TYPE_UNSPECIFIED
- ROLLOUT_POLICY
- - DISABLE_COPY_DATA
- MASKING_RULE
- MASKING_EXCEPTION
- RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW
@@ -1752,7 +1749,6 @@ paths:
enum:
- POLICY_TYPE_UNSPECIFIED
- ROLLOUT_POLICY
- - DISABLE_COPY_DATA
- MASKING_RULE
- MASKING_EXCEPTION
- RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW
@@ -2499,7 +2495,6 @@ paths:
enum:
- POLICY_TYPE_UNSPECIFIED
- ROLLOUT_POLICY
- - DISABLE_COPY_DATA
- MASKING_RULE
- MASKING_EXCEPTION
- RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW
@@ -2566,7 +2561,6 @@ paths:
enum:
- POLICY_TYPE_UNSPECIFIED
- ROLLOUT_POLICY
- - DISABLE_COPY_DATA
- MASKING_RULE
- MASKING_EXCEPTION
- RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW
@@ -3069,7 +3063,6 @@ paths:
enum:
- POLICY_TYPE_UNSPECIFIED
- ROLLOUT_POLICY
- - DISABLE_COPY_DATA
- MASKING_RULE
- MASKING_EXCEPTION
- RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW
@@ -3140,7 +3133,6 @@ paths:
enum:
- POLICY_TYPE_UNSPECIFIED
- ROLLOUT_POLICY
- - DISABLE_COPY_DATA
- MASKING_RULE
- MASKING_EXCEPTION
- RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW
@@ -4958,7 +4950,6 @@ paths:
enum:
- POLICY_TYPE_UNSPECIFIED
- ROLLOUT_POLICY
- - DISABLE_COPY_DATA
- MASKING_RULE
- MASKING_EXCEPTION
- RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW
@@ -5025,7 +5016,6 @@ paths:
enum:
- POLICY_TYPE_UNSPECIFIED
- ROLLOUT_POLICY
- - DISABLE_COPY_DATA
- MASKING_RULE
- MASKING_EXCEPTION
- RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index df9d6d87a2..d6baacce9b 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -203,7 +203,6 @@
- [store/policy.proto](#store_policy-proto)
- [Binding](#bytebase-store-Binding)
- [DataSourceQueryPolicy](#bytebase-store-DataSourceQueryPolicy)
- - [DisableCopyDataPolicy](#bytebase-store-DisableCopyDataPolicy)
- [EnvironmentTierPolicy](#bytebase-store-EnvironmentTierPolicy)
- [IamPolicy](#bytebase-store-IamPolicy)
- [MaskingExceptionPolicy](#bytebase-store-MaskingExceptionPolicy)
@@ -3408,21 +3407,6 @@ DataSourceQueryPolicy is the policy configuration for running statements in the
-<a name="bytebase-store-DisableCopyDataPolicy"></a>
-
-### DisableCopyDataPolicy
-DisableCopyDataPolicy is the policy configuration for disabling copying data.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| active | [bool](#bool) | | |
-
-
-
-
-
-
<a name="bytebase-store-EnvironmentTierPolicy"></a>
### EnvironmentTierPolicy
@@ -3542,6 +3526,7 @@ QueryDataPolicy is the policy configuration for querying data.
| disable_export | [bool](#bool) | | Disable export data in the SQL editor |
| maximum_result_size | [int64](#int64) | | The size limit in bytes. The default value is 100MB, we will use the default value if the setting not exists, or the limit &lt;= 0. |
| maximum_result_rows | [int32](#int32) | | The return rows limit. The default value is -1, means no limit. |
+| disable_copy_data | [bool](#bool) | | Disable copying data. |
@@ -3727,7 +3712,6 @@ RestrictIssueCreationForSQLReviewPolicy is the policy configuration for restrict
| TYPE_UNSPECIFIED | 0 | |
| ROLLOUT | 1 | |
| MASKING_EXCEPTION | 2 | |
-| DISABLE_COPY_DATA | 3 | |
| QUERY_DATA | 5 | |
| MASKING_RULE | 6 | |
| RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW | 7 | |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index bb831feb31..1140df7198 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -980,10 +980,6 @@
<a href="#bytebase.store.DataSourceQueryPolicy"><span class="badge">M</span>DataSourceQueryPolicy</a>
</li>
- <li>
- <a href="#bytebase.store.DisableCopyDataPolicy"><span class="badge">M</span>DisableCopyDataPolicy</a>
- </li>
-
<li>
<a href="#bytebase.store.EnvironmentTierPolicy"><span class="badge">M</span>EnvironmentTierPolicy</a>
</li>
@@ -9515,30 +9511,6 @@ If the condition evaluates to false, then this binding does not apply to the cur
- <h3 id="bytebase.store.DisableCopyDataPolicy">DisableCopyDataPolicy</h3>
- <p>DisableCopyDataPolicy is the policy configuration for disabling copying data.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>active</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
<h3 id="bytebase.store.EnvironmentTierPolicy">EnvironmentTierPolicy</h3>
<p>EnvironmentTierPolicy is the tier of an environment.</p>
@@ -9768,6 +9740,13 @@ The default value is 100MB, we will use the default value if the setting not exi
The default value is -1, means no limit. </p></td>
</tr>
+ <tr>
+ <td>disable_copy_data</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Disable copying data. </p></td>
+ </tr>
+
</tbody>
</table>
@@ -10181,12 +10160,6 @@ for example, the environment resource can have the sql review config tag, like &
<td><p></p></td>
</tr>
- <tr>
- <td>DISABLE_COPY_DATA</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
<tr>
<td>QUERY_DATA</td>
<td>5</td>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 47328d3224..5d2f530013 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -400,7 +400,6 @@
- [CreatePolicyRequest](#bytebase-v1-CreatePolicyRequest)
- [DataSourceQueryPolicy](#bytebase-v1-DataSourceQueryPolicy)
- [DeletePolicyRequest](#bytebase-v1-DeletePolicyRequest)
- - [DisableCopyDataPolicy](#bytebase-v1-DisableCopyDataPolicy)
- [GetPolicyRequest](#bytebase-v1-GetPolicyRequest)
- [ListPoliciesRequest](#bytebase-v1-ListPoliciesRequest)
- [ListPoliciesResponse](#bytebase-v1-ListPoliciesResponse)
@@ -6750,21 +6749,6 @@ DataSourceQueryPolicy is the policy configuration for running statements in the
-<a name="bytebase-v1-DisableCopyDataPolicy"></a>
-
-### DisableCopyDataPolicy
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| active | [bool](#bool) | | |
-
-
-
-
-
-
<a name="bytebase-v1-GetPolicyRequest"></a>
### GetPolicyRequest
@@ -6905,7 +6889,6 @@ For example: environment_id == &#34;test&#34; &amp;&amp; project_id == &#34;samp
| inherit_from_parent | [bool](#bool) | | |
| type | [PolicyType](#bytebase-v1-PolicyType) | | |
| rollout_policy | [RolloutPolicy](#bytebase-v1-RolloutPolicy) | | |
-| disable_copy_data_policy | [DisableCopyDataPolicy](#bytebase-v1-DisableCopyDataPolicy) | | |
| masking_rule_policy | [MaskingRulePolicy](#bytebase-v1-MaskingRulePolicy) | | |
| masking_exception_policy | [MaskingExceptionPolicy](#bytebase-v1-MaskingExceptionPolicy) | | |
| restrict_issue_creation_for_sql_review_policy | [RestrictIssueCreationForSQLReviewPolicy](#bytebase-v1-RestrictIssueCreationForSQLReviewPolicy) | | |
@@ -6932,6 +6915,7 @@ QueryDataPolicy is the policy configuration for querying data.
| disable_export | [bool](#bool) | | Disable export data in the SQL editor |
| maximum_result_size | [int64](#int64) | | The size limit in bytes. The default value is 100MB, we will use the default value if the setting not exists, or the limit &lt;= 0. |
| maximum_result_rows | [int32](#int32) | | The return rows limit. The default value is -1, means no limit. |
+| disable_copy_data | [bool](#bool) | | Disable copying data. |
@@ -7122,7 +7106,6 @@ The policy&#39;s `name` field is used to identify the instance to update. Format
| ---- | ------ | ----------- |
| POLICY_TYPE_UNSPECIFIED | 0 | |
| ROLLOUT_POLICY | 11 | |
-| DISABLE_COPY_DATA | 8 | |
| MASKING_RULE | 9 | |
| MASKING_EXCEPTION | 10 | |
| RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW | 12 | |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 49e49595e7..9a112944fb 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -1704,10 +1704,6 @@
<a href="#bytebase.v1.DeletePolicyRequest"><span class="badge">M</span>DeletePolicyRequest</a>
</li>
- <li>
- <a href="#bytebase.v1.DisableCopyDataPolicy"><span class="badge">M</span>DisableCopyDataPolicy</a>
- </li>
-
<li>
<a href="#bytebase.v1.GetPolicyRequest"><span class="badge">M</span>GetPolicyRequest</a>
</li>
@@ -19029,30 +19025,6 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>
- <h3 id="bytebase.v1.DisableCopyDataPolicy">DisableCopyDataPolicy</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>active</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
<h3 id="bytebase.v1.GetPolicyRequest">GetPolicyRequest</h3>
<p></p>
@@ -19379,13 +19351,6 @@ Database resource name: instances/instance-id/databases/database-name. </p></td>
<td><p> </p></td>
</tr>
- <tr>
- <td>disable_copy_data_policy</td>
- <td><a href="#bytebase.v1.DisableCopyDataPolicy">DisableCopyDataPolicy</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
<tr>
<td>masking_rule_policy</td>
<td><a href="#bytebase.v1.MaskingRulePolicy">MaskingRulePolicy</a></td>
@@ -19489,6 +19454,13 @@ The default value is 100MB, we will use the default value if the setting not exi
The default value is -1, means no limit. </p></td>
</tr>
+ <tr>
+ <td>disable_copy_data</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Disable copying data. </p></td>
+ </tr>
+
</tbody>
</table>
@@ -19913,12 +19885,6 @@ In this situation, `update_mask` is ignored. </p></td>
<td><p></p></td>
</tr>
- <tr>
- <td>DISABLE_COPY_DATA</td>
- <td>8</td>
- <td><p></p></td>
- </tr>
-
<tr>
<td>MASKING_RULE</td>
<td>9</td>
diff --git a/proto/store/store/policy.proto b/proto/store/store/policy.proto
index 1673484c8b..69aad36820 100644
--- a/proto/store/store/policy.proto
+++ b/proto/store/store/policy.proto
@@ -13,7 +13,6 @@ message Policy {
TYPE_UNSPECIFIED = 0;
ROLLOUT = 1;
MASKING_EXCEPTION = 2;
- DISABLE_COPY_DATA = 3;
QUERY_DATA = 5;
MASKING_RULE = 6;
RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW = 7;
@@ -156,11 +155,6 @@ message EnvironmentTierPolicy {
string color = 2;
}
-// DisableCopyDataPolicy is the policy configuration for disabling copying data.
-message DisableCopyDataPolicy {
- bool active = 1;
-}
-
// QueryDataPolicy is the policy configuration for querying data.
message QueryDataPolicy {
// The query timeout duration.
@@ -176,6 +170,9 @@ message QueryDataPolicy {
// The return rows limit.
// The default value is -1, means no limit.
int32 maximum_result_rows = 4;
+
+ // Disable copying data.
+ bool disable_copy_data = 5;
}
// RestrictIssueCreationForSQLReviewPolicy is the policy configuration for restricting issue creation for SQL review.
diff --git a/proto/v1/v1/org_policy_service.proto b/proto/v1/v1/org_policy_service.proto
index f46cbcc3ec..4311fe91fa 100644
--- a/proto/v1/v1/org_policy_service.proto
+++ b/proto/v1/v1/org_policy_service.proto
@@ -243,7 +243,6 @@ message Policy {
oneof policy {
RolloutPolicy rollout_policy = 19;
- DisableCopyDataPolicy disable_copy_data_policy = 16;
MaskingRulePolicy masking_rule_policy = 17;
MaskingExceptionPolicy masking_exception_policy = 18;
RestrictIssueCreationForSQLReviewPolicy restrict_issue_creation_for_sql_review_policy = 20;
@@ -263,7 +262,6 @@ enum PolicyType {
POLICY_TYPE_UNSPECIFIED = 0;
ROLLOUT_POLICY = 11;
- DISABLE_COPY_DATA = 8;
MASKING_RULE = 9;
MASKING_EXCEPTION = 10;
RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW = 12;
@@ -315,10 +313,6 @@ message RolloutPolicy {
}
}
-message DisableCopyDataPolicy {
- bool active = 1;
-}
-
// QueryDataPolicy is the policy configuration for querying data.
message QueryDataPolicy {
// The query timeout duration.
@@ -334,6 +328,9 @@ message QueryDataPolicy {
// The return rows limit.
// The default value is -1, means no limit.
int32 maximum_result_rows = 4;
+
+ // Disable copying data.
+ bool disable_copy_data = 5;
}
// The SQL review rules. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.
diff --git a/scripts/check_link_test.go b/scripts/check_link_test.go
index e46a976d69..a2fa15098c 100644
--- a/scripts/check_link_test.go
+++ b/scripts/check_link_test.go
@@ -1,4 +1,4 @@
-package tests
+package scripts
import (
"fmt"