Skip to content

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

chore: approval template no creator (#16179)

Danny Xu5ec64ed9c4e2
diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.go
index 9ae14473ad..59fc486ce3 100644
--- a/backend/api/v1/setting_service.go
+++ b/backend/api/v1/setting_service.go
@@ -98,7 +98,7 @@ func (s *SettingService) ListSettings(ctx context.Context, _ *v1pb.ListSettingsR
if !settingInWhitelist(setting.Name) {
continue
}
- settingMessage, err := s.convertToSettingMessage(ctx, setting)
+ settingMessage, err := convertToSettingMessage(setting)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert setting message: %v", err)
}
@@ -129,7 +129,7 @@ func (s *SettingService) GetSetting(ctx context.Context, request *v1pb.GetSettin
return nil, status.Errorf(codes.NotFound, "setting %s not found", settingName)
}
// Only return whitelisted setting.
- settingMessage, err := s.convertToSettingMessage(ctx, setting)
+ settingMessage, err := convertToSettingMessage(setting)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert setting message: %v", err)
}
@@ -163,7 +163,7 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
}
// audit log.
if setServiceData, ok := common.GetSetServiceDataFromContext(ctx); ok && existedSetting != nil {
- v1pbSetting, err := s.convertToSettingMessage(ctx, existedSetting)
+ v1pbSetting, err := convertToSettingMessage(existedSetting)
if err != nil {
slog.Warn("audit: failed to convert to v1.Setting", log.BBError(err))
}
@@ -293,20 +293,6 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
return nil, status.Errorf(codes.InvalidArgument, "invalid approval template: %v, err: %v", rule.Template, err)
}
- creatorID := 0
- email, err := common.GetUserEmail(rule.Template.Creator)
- if err != nil {
- return nil, status.Errorf(codes.InvalidArgument, "failed to get creator: %v", err)
- }
- creator, err := s.store.GetUserByEmail(ctx, email)
- if err != nil {
- return nil, status.Errorf(codes.Internal, "failed to get creator: %v", err)
- }
- if creator == nil {
- return nil, status.Errorf(codes.InvalidArgument, "creator %s not found", rule.Template.Creator)
- }
- creatorID = creator.ID
-
flow := new(storepb.ApprovalFlow)
if err := convertProtoToProto(rule.Template.Flow, flow); err != nil {
return nil, status.Errorf(codes.Internal, "failed to unmarshal approval flow with error: %v", err)
@@ -317,7 +303,6 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
Flow: flow,
Title: rule.Template.Title,
Description: rule.Template.Description,
- CreatorId: int32(creatorID),
},
})
}
@@ -580,7 +565,7 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
return nil, status.Errorf(codes.InvalidArgument, "API endpoint and model are required")
}
if existedSetting != nil {
- existedAISetting, err := s.convertToSettingMessage(ctx, existedSetting)
+ existedAISetting, err := convertToSettingMessage(existedSetting)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to unmarshal existed ai setting with error: %v", err)
}
@@ -649,7 +634,7 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *v1pb.Update
return nil, status.Errorf(codes.Internal, "failed to set setting: %v", err)
}
- settingMessage, err := s.convertToSettingMessage(ctx, setting)
+ settingMessage, err := convertToSettingMessage(setting)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to convert setting message: %v", err)
}
@@ -686,7 +671,7 @@ func convertProtoToProto(inputPB, outputPB protoreflect.ProtoMessage) error {
return nil
}
-func (s *SettingService) convertToSettingMessage(ctx context.Context, setting *store.SettingMessage) (*v1pb.Setting, error) {
+func convertToSettingMessage(setting *store.SettingMessage) (*v1pb.Setting, error) {
settingName := fmt.Sprintf("%s%s", common.SettingNamePrefix, setting.Name)
switch setting.Name {
case base.SettingWorkspaceMailDelivery:
@@ -776,13 +761,6 @@ func (s *SettingService) convertToSettingMessage(ctx context.Context, setting *s
v1Value := &v1pb.WorkspaceApprovalSetting{}
for _, rule := range storeValue.Rules {
template := convertToApprovalTemplate(rule.Template)
- creator, err := s.store.GetUserByID(ctx, int(rule.Template.CreatorId))
- if err != nil {
- return nil, status.Errorf(codes.Internal, "failed to get creator: %v", err)
- }
- if creator != nil {
- template.Creator = common.FormatUserEmail(creator.Email)
- }
v1Value.Rules = append(v1Value.Rules, &v1pb.WorkspaceApprovalSetting_Rule{
Condition: rule.Condition,
Template: template,
diff --git a/backend/migrator/migration/3.7/0001##approval_template_creator.sql b/backend/migrator/migration/3.7/0001##approval_template_creator.sql
new file mode 100644
index 0000000000..f032b70967
--- /dev/null
+++ b/backend/migrator/migration/3.7/0001##approval_template_creator.sql
@@ -0,0 +1,15 @@
+UPDATE setting
+SET value = (
+ SELECT jsonb_build_object(
+ 'rules',
+ jsonb_agg(
+ jsonb_set(
+ rule::jsonb,
+ '{template}',
+ (rule->'template')::jsonb - 'creatorId'
+ )
+ )
+ )
+ FROM jsonb_array_elements(value::jsonb->'rules') AS rule
+)
+WHERE name = 'bb.workspace.approval';
\ No newline at end of file
diff --git a/backend/migrator/migration/3.6/0006##risk_role.sql b/backend/migrator/migration/3.7/0002##risk_role.sql
similarity index 100%
rename from backend/migrator/migration/3.6/0006##risk_role.sql
rename to backend/migrator/migration/3.7/0002##risk_role.sql
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index 15a0eadc1c..32aef5f21d 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.7.0"), *files[len(files)-1].version)
+ require.Equal(t, semver.MustParse("3.7.2"), *files[len(files)-1].version)
}
func TestVersionUnique(t *testing.T) {
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue
index bb5f0e5f47..34d90e9914 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/FlowsPanel/FlowTable.vue
@@ -11,7 +11,6 @@
<template #item="{ item: rule }: { item: LocalApprovalRule }">
<div class="bb-grid-cell whitespace-nowrap">
{{ rule.template?.title }}
- <SystemLabel v-if="isReadonlyApprovalRule(rule)" class="ml-1" />
</div>
<div class="bb-grid-cell justify-center">
<NButton
@@ -28,7 +27,7 @@
{{ rule.template?.description }}
</div>
<div class="bb-grid-cell gap-x-2">
- <template v-if="!isReadonlyApprovalRule(rule)">
+ <template>
<NButton size="small" @click="editApprovalTemplate(rule)">
{{ allowAdmin ? $t("common.edit") : $t("common.view") }}
</NButton>
@@ -61,11 +60,9 @@ import { NButton } from "naive-ui";
import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { BBGrid, BBModal, type BBGridColumn } from "@/bbkit";
-import SystemLabel from "@/components/SystemLabel.vue";
import { pushNotification, useWorkspaceApprovalSettingStore } from "@/store";
import type { LocalApprovalRule } from "@/types";
import type { ApprovalFlow } from "@/types/proto/v1/issue_service";
-import { isReadonlyApprovalRule } from "@/utils";
import { SpinnerButton } from "../../common";
import { StepsTable } from "../common";
import { useCustomApprovalContext } from "../context";
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleDialog.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleDialog.vue
index 5db30b427a..0d00129fc6 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleDialog.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleDialog.vue
@@ -29,7 +29,7 @@ import { useI18n } from "vue-i18n";
import { BBModal, BBSpin } from "@/bbkit";
import { pushNotification, useWorkspaceApprovalSettingStore } from "@/store";
import type { LocalApprovalRule } from "@/types";
-import { isReadonlyApprovalRule, defer } from "@/utils";
+import { defer } from "@/utils";
import { useCustomApprovalContext } from "../context";
import RuleForm from "./RuleForm.vue";
@@ -52,7 +52,7 @@ const allowEditRule = computed(() => {
if (!allowAdmin.value) return false;
const rule = dialog.value?.rule;
if (!rule) return false;
- return !isReadonlyApprovalRule(rule);
+ return true;
});
const title = computed(() => {
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleForm.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleForm.vue
index 1c7d2b98f2..79a9060527 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleForm.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RuleDialog/RuleForm.vue
@@ -74,7 +74,6 @@ import { NButton, NInput } from "naive-ui";
import { computed, nextTick, onMounted, ref } from "vue";
import RequiredStar from "@/components/RequiredStar.vue";
import type { LocalApprovalRule } from "@/types";
-import { isReadonlyApprovalRule } from "@/utils";
import { StepsTable } from "../common";
import { useCustomApprovalContext } from "../context";
import { validateApprovalTemplate } from "../logic";
@@ -114,7 +113,7 @@ const state = ref(resolveLocalState());
const allowEditRule = computed(() => {
if (!allowAdmin.value) return false;
- return !isReadonlyApprovalRule(rule.value);
+ return true;
});
const allowCreateOrUpdate = computed(() => {
diff --git a/frontend/src/store/modules/workspaceApprovalSetting.ts b/frontend/src/store/modules/workspaceApprovalSetting.ts
index ae48101cf7..0823e70ce3 100644
--- a/frontend/src/store/modules/workspaceApprovalSetting.ts
+++ b/frontend/src/store/modules/workspaceApprovalSetting.ts
@@ -10,7 +10,6 @@ import {
buildWorkspaceApprovalSetting,
seedWorkspaceApprovalSetting,
} from "@/utils";
-import { useUserStore } from "./user";
import { useGracefulRequest } from "./utils";
const SETTING_NAME = "settings/bb.workspace.approval";
@@ -30,9 +29,6 @@ export const useWorkspaceApprovalSettingStore = defineStore(
if (_config.rules.length === 0) {
_config.rules.push(...seedWorkspaceApprovalSetting());
}
- await useUserStore().batchGetUsers(
- _config.rules.map((rule) => rule.template?.creator ?? "")
- );
config.value = await resolveLocalApprovalConfig(_config);
}
};
diff --git a/frontend/src/types/proto/v1/issue_service.ts b/frontend/src/types/proto/v1/issue_service.ts
index 7e93749dca..e38d1054df 100644
--- a/frontend/src/types/proto/v1/issue_service.ts
+++ b/frontend/src/types/proto/v1/issue_service.ts
@@ -542,11 +542,6 @@ export interface ApprovalTemplate {
flow: ApprovalFlow | undefined;
title: string;
description: string;
- /**
- * The name of the creator in users/{email} format.
- * TODO: we should mark it as OUTPUT_ONLY, but currently the frontend will post the approval setting with creator.
- */
- creator: string;
}
export interface ApprovalFlow {
@@ -2632,7 +2627,7 @@ export const GrantRequest: MessageFns<GrantRequest> = {
};
function createBaseApprovalTemplate(): ApprovalTemplate {
- return { flow: undefined, title: "", description: "", creator: "" };
+ return { flow: undefined, title: "", description: "" };
}
export const ApprovalTemplate: MessageFns<ApprovalTemplate> = {
@@ -2646,9 +2641,6 @@ export const ApprovalTemplate: MessageFns<ApprovalTemplate> = {
if (message.description !== "") {
writer.uint32(26).string(message.description);
}
- if (message.creator !== "") {
- writer.uint32(34).string(message.creator);
- }
return writer;
},
@@ -2683,14 +2675,6 @@ export const ApprovalTemplate: MessageFns<ApprovalTemplate> = {
message.description = reader.string();
continue;
}
- case 4: {
- if (tag !== 34) {
- break;
- }
-
- message.creator = reader.string();
- continue;
- }
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -2705,7 +2689,6 @@ export const ApprovalTemplate: MessageFns<ApprovalTemplate> = {
flow: isSet(object.flow) ? ApprovalFlow.fromJSON(object.flow) : undefined,
title: isSet(object.title) ? globalThis.String(object.title) : "",
description: isSet(object.description) ? globalThis.String(object.description) : "",
- creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
};
},
@@ -2720,9 +2703,6 @@ export const ApprovalTemplate: MessageFns<ApprovalTemplate> = {
if (message.description !== "") {
obj.description = message.description;
}
- if (message.creator !== "") {
- obj.creator = message.creator;
- }
return obj;
},
@@ -2736,7 +2716,6 @@ export const ApprovalTemplate: MessageFns<ApprovalTemplate> = {
: undefined;
message.title = object.title ?? "";
message.description = object.description ?? "";
- message.creator = object.creator ?? "";
return message;
},
};
diff --git a/frontend/src/utils/workspaceApprovalSetting.ts b/frontend/src/utils/workspaceApprovalSetting.ts
index d0b9f94c81..947459bc73 100644
--- a/frontend/src/utils/workspaceApprovalSetting.ts
+++ b/frontend/src/utils/workspaceApprovalSetting.ts
@@ -9,14 +9,9 @@ import {
resolveCELExpr,
} from "@/plugins/cel";
import { t } from "@/plugins/i18n";
-import { useUserStore } from "@/store";
-import { userNamePrefix } from "@/store/modules/v1/common";
-import { extractUserId } from "@/store/modules/v1/common";
import type { ParsedApprovalRule, UnrecognizedApprovalRule } from "@/types";
import {
DEFAULT_RISK_LEVEL,
- UNKNOWN_USER_NAME,
- SYSTEM_BOT_EMAIL,
PresetRoleType,
} from "@/types";
import type { LocalApprovalConfig, LocalApprovalRule } from "@/types";
@@ -306,7 +301,6 @@ export const seedWorkspaceApprovalSetting = () => {
template: {
title,
description,
- creator: `${userNamePrefix}${useUserStore().systemBotUser?.email ?? SYSTEM_BOT_EMAIL}`,
flow: {
steps: roles.map(
(role): ApprovalStep => ({
@@ -362,9 +356,4 @@ export const seedWorkspaceApprovalSetting = () => {
const description = t(keypath);
return generateRule(title, description, preset.roles);
});
-};
-
-export const isReadonlyApprovalRule = (rule: LocalApprovalRule) => {
- const creatorName = rule.template.creator ?? UNKNOWN_USER_NAME;
- return extractUserId(creatorName) === SYSTEM_BOT_EMAIL;
-};
+};
\ No newline at end of file
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index bb72caa02b..aff0b8ff3a 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -8123,11 +8123,6 @@ components:
type: string
description:
type: string
- creator:
- type: string
- description: |-
- The name of the creator in users/{email} format.
- TODO: we should mark it as OUTPUT_ONLY, but currently the frontend will post the approval setting with creator.
ApproveIssueRequest:
required:
- name
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index bc42e929ca..c3da203751 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -593,7 +593,6 @@ offset.
| flow | [ApprovalFlow](#bytebase-store-ApprovalFlow) | | |
| title | [string](#string) | | |
| description | [string](#string) | | |
-| creator_id | [int32](#int32) | | |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 027ca8f86e..59d1e528a0 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -2148,13 +2148,6 @@ TODO: use range instead. </p></td>
<td><p> </p></td>
</tr>
- <tr>
- <td>creator_id</td>
- <td><a href="#int32">int32</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
</tbody>
</table>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 2bfd73cec9..b6e743c832 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -3354,7 +3354,6 @@ LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)
| flow | [ApprovalFlow](#bytebase-v1-ApprovalFlow) | | |
| title | [string](#string) | | |
| description | [string](#string) | | |
-| creator | [string](#string) | | The name of the creator in users/{email} format. TODO: we should mark it as OUTPUT_ONLY, but currently the frontend will post the approval setting with creator. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 79cdf4ca8c..4f9a04fc54 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -10304,14 +10304,6 @@ The API will default to the BASIC view.</p></td>
<td><p> </p></td>
</tr>
- <tr>
- <td>creator</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name of the creator in users/{email} format.
-TODO: we should mark it as OUTPUT_ONLY, but currently the frontend will post the approval setting with creator. </p></td>
- </tr>
-
</tbody>
</table>
diff --git a/proto/generated-go/store/approval.pb.go b/proto/generated-go/store/approval.pb.go
index a405e98017..b0abb38bda 100644
--- a/proto/generated-go/store/approval.pb.go
+++ b/proto/generated-go/store/approval.pb.go
@@ -312,7 +312,6 @@ type ApprovalTemplate struct {
Flow *ApprovalFlow `protobuf:"bytes,1,opt,name=flow,proto3" json:"flow,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
- CreatorId int32 `protobuf:"varint,4,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -368,13 +367,6 @@ func (x *ApprovalTemplate) GetDescription() string {
return ""
}
-func (x *ApprovalTemplate) GetCreatorId() int32 {
- if x != nil {
- return x.CreatorId
- }
- return 0
-}
-
type ApprovalFlow struct {
state protoimpl.MessageState `protogen:"open.v1"`
Steps []*ApprovalStep `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`
@@ -601,13 +593,11 @@ const file_store_approval_proto_rawDesc = "" +
"\x16RISK_LEVEL_UNSPECIFIED\x10\x00\x12\a\n" +
"\x03LOW\x10\x01\x12\f\n" +
"\bMODERATE\x10\x02\x12\b\n" +
- "\x04HIGH\x10\x03\"\x9b\x01\n" +
+ "\x04HIGH\x10\x03\"|\n" +
"\x10ApprovalTemplate\x120\n" +
"\x04flow\x18\x01 \x01(\v2\x1c.bytebase.store.ApprovalFlowR\x04flow\x12\x14\n" +
"\x05title\x18\x02 \x01(\tR\x05title\x12 \n" +
- "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x1d\n" +
- "\n" +
- "creator_id\x18\x04 \x01(\x05R\tcreatorId\"B\n" +
+ "\vdescription\x18\x03 \x01(\tR\vdescription\"B\n" +
"\fApprovalFlow\x122\n" +
"\x05steps\x18\x01 \x03(\v2\x1c.bytebase.store.ApprovalStepR\x05steps\"\xa9\x01\n" +
"\fApprovalStep\x125\n" +
diff --git a/proto/generated-go/v1/issue_service.pb.go b/proto/generated-go/v1/issue_service.pb.go
index 2247c84e33..b231359d3e 100644
--- a/proto/generated-go/v1/issue_service.pb.go
+++ b/proto/generated-go/v1/issue_service.pb.go
@@ -1498,13 +1498,10 @@ func (x *GrantRequest) GetExpiration() *durationpb.Duration {
}
type ApprovalTemplate struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Flow *ApprovalFlow `protobuf:"bytes,1,opt,name=flow,proto3" json:"flow,omitempty"`
- Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
- Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
- // The name of the creator in users/{email} format.
- // TODO: we should mark it as OUTPUT_ONLY, but currently the frontend will post the approval setting with creator.
- Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Flow *ApprovalFlow `protobuf:"bytes,1,opt,name=flow,proto3" json:"flow,omitempty"`
+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1560,13 +1557,6 @@ func (x *ApprovalTemplate) GetDescription() string {
return ""
}
-func (x *ApprovalTemplate) GetCreator() string {
- if x != nil {
- return x.Creator
- }
- return ""
-}
-
type ApprovalFlow struct {
state protoimpl.MessageState `protogen:"open.v1"`
Steps []*ApprovalStep `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`
@@ -2704,12 +2694,11 @@ const file_v1_issue_service_proto_rawDesc = "" +
"\tcondition\x18\x03 \x01(\v2\x11.google.type.ExprR\tcondition\x129\n" +
"\n" +
"expiration\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\n" +
- "expiration\"\x93\x01\n" +
+ "expiration\"y\n" +
"\x10ApprovalTemplate\x12-\n" +
"\x04flow\x18\x01 \x01(\v2\x19.bytebase.v1.ApprovalFlowR\x04flow\x12\x14\n" +
"\x05title\x18\x02 \x01(\tR\x05title\x12 \n" +
- "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x18\n" +
- "\acreator\x18\x04 \x01(\tR\acreator\"?\n" +
+ "\vdescription\x18\x03 \x01(\tR\vdescription\"?\n" +
"\fApprovalFlow\x12/\n" +
"\x05steps\x18\x01 \x03(\v2\x19.bytebase.v1.ApprovalStepR\x05steps\"\xa3\x01\n" +
"\fApprovalStep\x122\n" +
diff --git a/proto/store/store/approval.proto b/proto/store/store/approval.proto
index 99474de78a..74aa2ffb45 100644
--- a/proto/store/store/approval.proto
+++ b/proto/store/store/approval.proto
@@ -43,7 +43,6 @@ message ApprovalTemplate {
ApprovalFlow flow = 1;
string title = 2;
string description = 3;
- int32 creator_id = 4;
}
message ApprovalFlow {
diff --git a/proto/v1/v1/issue_service.proto b/proto/v1/v1/issue_service.proto
index 0b645a8f64..ca0755083f 100644
--- a/proto/v1/v1/issue_service.proto
+++ b/proto/v1/v1/issue_service.proto
@@ -443,9 +443,6 @@ message ApprovalTemplate {
ApprovalFlow flow = 1;
string title = 2;
string description = 3;
- // The name of the creator in users/{email} format.
- // TODO: we should mark it as OUTPUT_ONLY, but currently the frontend will post the approval setting with creator.
- string creator = 4;
}
message ApprovalFlow {