Skip to content

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

chore: deprecate project role provider and project member role provider (#4353)

Danny Xuf53cddd7a1e8
diff --git a/api/project.go b/api/project.go
index 860c43960e..5467e53eab 100644
--- a/api/project.go
+++ b/api/project.go
@@ -80,8 +80,7 @@ type Project struct {
// All database with the same {{DB_NAME}} (base database name) belong to one group.
//
// Empty value means all tenant databases in the project belonging to the same group.
- DBNameTemplate string `jsonapi:"attr,dbNameTemplate"`
- RoleProvider ProjectRoleProvider `jsonapi:"attr,roleProvider"`
+ DBNameTemplate string `jsonapi:"attr,dbNameTemplate"`
// SchemaChangeType is the type of the schema migration script.
SchemaChangeType ProjectSchemaChangeType `jsonapi:"attr,schemaChangeType"`
// LGTMCheckSetting is the setting of the LGTM check.
@@ -95,7 +94,6 @@ type ProjectCreate struct {
Key string `jsonapi:"attr,key"`
TenantMode ProjectTenantMode `jsonapi:"attr,tenantMode"`
DBNameTemplate string `jsonapi:"attr,dbNameTemplate"`
- RoleProvider ProjectRoleProvider `jsonapi:"attr,roleProvider"`
SchemaChangeType ProjectSchemaChangeType `jsonapi:"attr,schemaChangeType"`
}
@@ -129,8 +127,7 @@ type ProjectPatch struct {
Key *string `jsonapi:"attr,key"`
TenantMode *ProjectTenantMode `jsonapi:"attr,tenantMode"`
DBNameTemplate *string `jsonapi:"attr,dbNameTemplate"`
- WorkflowType *string `jsonapi:"attr,workflowType"` // NOTE: We can't use *ProjectWorkflowType because "google/jsonapi" doesn't support.
- RoleProvider *string `jsonapi:"attr,roleProvider"`
+ WorkflowType *string `jsonapi:"attr,workflowType"` // NOTE: We can't use *ProjectWorkflowType because "google/jsonapi" doesn't support.
SchemaChangeType *string `jsonapi:"attr,schemaChangeType"` // NOTE: We can't use *ProjectSchemaChangeType because "google/jsonapi" doesn't support.
LGTMCheckSetting *LGTMCheckSetting `jsonapi:"attr,lgtmCheckSetting"`
}
diff --git a/api/project_member.go b/api/project_member.go
index b776b5dbb6..40cbdf6585 100644
--- a/api/project_member.go
+++ b/api/project_member.go
@@ -6,25 +6,6 @@ import (
"github.com/bytebase/bytebase/common"
)
-// ProjectRoleProvider is the role provider for a user in projects.
-type ProjectRoleProvider string
-
-const (
- // ProjectRoleProviderBytebase indicates the role provider is the Bytebase.
- ProjectRoleProviderBytebase ProjectRoleProvider = "BYTEBASE"
- // ProjectRoleProviderGitLabSelfHost indicates the role provider is the GitLab
- // self-hosted.
- ProjectRoleProviderGitLabSelfHost ProjectRoleProvider = "GITLAB_SELF_HOST"
- // ProjectRoleProviderGitHubCom indicates the role provider is the GitHub.com.
- ProjectRoleProviderGitHubCom ProjectRoleProvider = "GITHUB_COM"
-)
-
-// ProjectRoleProviderPayload is the payload for role provider.
-type ProjectRoleProviderPayload struct {
- VCSRole string `json:"vcsRole"`
- LastSyncTs int64 `json:"lastSyncTs"`
-}
-
// ProjectMember is the API message for project members.
type ProjectMember struct {
ID int `jsonapi:"primary,projectMember"`
@@ -42,11 +23,9 @@ type ProjectMember struct {
ProjectID int `jsonapi:"attr,projectId"`
// Domain specific fields
- Role string `jsonapi:"attr,role"`
- PrincipalID int
- Principal *Principal `jsonapi:"relation,principal"`
- RoleProvider ProjectRoleProvider `jsonapi:"attr,roleProvider"`
- Payload string `jsonapi:"attr,payload"`
+ Role string `jsonapi:"attr,role"`
+ PrincipalID int
+ Principal *Principal `jsonapi:"relation,principal"`
}
// ProjectMemberCreate is the API message for creating a project member.
@@ -59,10 +38,8 @@ type ProjectMemberCreate struct {
ProjectID int
// Domain specific fields
- Role common.ProjectRole `jsonapi:"attr,role"`
- PrincipalID int `jsonapi:"attr,principalId"`
- RoleProvider ProjectRoleProvider `jsonapi:"attr,roleProvider"`
- Payload string `jsonapi:"attr,payload"`
+ Role common.ProjectRole `jsonapi:"attr,role"`
+ PrincipalID int `jsonapi:"attr,principalId"`
}
// ProjectMemberFind is the API message for finding project members.
@@ -70,10 +47,9 @@ type ProjectMemberFind struct {
ID *int
// Related fields
- ProjectID *int
- PrincipalID *int
- Role *Role
- RoleProvider *ProjectRoleProvider
+ ProjectID *int
+ PrincipalID *int
+ Role *Role
}
func (find *ProjectMemberFind) String() string {
@@ -93,9 +69,7 @@ type ProjectMemberPatch struct {
UpdaterID int
// Domain specific fields
- Role *string `jsonapi:"attr,role"`
- RoleProvider *string `jsonapi:"attr,roleProvider"`
- Payload *string `jsonapi:"attr,payload"`
+ Role *string `jsonapi:"attr,role"`
}
// ProjectMemberDelete is the API message for deleting a project member.
@@ -108,19 +82,6 @@ type ProjectMemberDelete struct {
DeleterID int
}
-// ProjectMemberBatchUpdate is the API message for batch updating project member.
-type ProjectMemberBatchUpdate struct {
- ProjectID int
-
- // Standard fields
- // Value is assigned from the jwt subject field passed by the client.
- UpdaterID int
-
- // All the Member to be update should have the same role provider as this field
- RoleProvider ProjectRoleProvider
- List []*ProjectMemberCreate
-}
-
// ProjectPermissionType is the type of a project permission.
type ProjectPermissionType string
diff --git a/frontend/src/components/ProjectCreate.vue b/frontend/src/components/ProjectCreate.vue
index 541f2bf324..670c49a489 100644
--- a/frontend/src/components/ProjectCreate.vue
+++ b/frontend/src/components/ProjectCreate.vue
@@ -134,7 +134,6 @@ export default defineComponent({
key: randomString(3).toUpperCase(),
tenantMode: "DISABLED",
dbNameTemplate: "",
- roleProvider: "BYTEBASE",
} as Project,
showFeatureModal: false,
isCreating: false,
diff --git a/frontend/src/components/ProjectMemberPanel.vue b/frontend/src/components/ProjectMemberPanel.vue
index 37eb1b903c..13cdca6730 100644
--- a/frontend/src/components/ProjectMemberPanel.vue
+++ b/frontend/src/components/ProjectMemberPanel.vue
@@ -10,78 +10,7 @@
{{ $t("project.settings.manage-member") }}
</span>
- <div v-if="allowSyncVCS" class="inline-block float-right">
- <span class="normal-link text-sm mr-5" @click="openWindowForVCSMember">
- {{ $t("project.settings.view-vcs-member") }}
- </span>
-
- <span class="text-sm text-control">
- {{ $t("project.settings.sync-from-vcs") }}
- </span>
- <heroicons-outline:refresh
- v-if="project.roleProvider !== 'BYTEBASE'"
- class="ml-1 inline text-sm normal-link"
- @click.prevent="onRefreshSync"
- />
- <div class="w-auto ml-3 inline-block align-middle">
- <BBSwitch
- :value="project.roleProvider !== 'BYTEBASE'"
- @toggle="
- (on) => {
- onToggleRoleProvider(on);
- }
- "
- />
- </div>
- </div>
-
- <NModal
- v-model:show="state.showModal"
- :style="project.roleProvider === 'BYTEBASE' ? '' : 'width:800px'"
- :mask-closable="false"
- preset="dialog"
- :title="$t('settings.members.toggle-role-provider.title')"
- :on-after-leave="
- () => {
- state.previewMember = false;
- }
- "
- :positive-text="$t('common.confirm')"
- :negative-text="$t('common.cancel')"
- @positive-click="onConfirmToggleRoleProvider"
- @negative-click="
- () => {
- state.showModal = false;
- }
- "
- >
- <template v-if="state.previewMember">
- <div class="mx-1">
- {{ $t("settings.members.change-role-provider-to-bytebase.content") }}
- </div>
- <div class="overflow-y-auto max-h-72">
- <ProjectMemberTable
- :project="project"
- :active-role-provider="'BYTEBASE'"
- />
- </div>
- </template>
-
- <template v-else>
- <div class="mx-1">
- <span class="font-bold">
- {{ $t("settings.members.change-role-provider-to-vcs.emphasize") }}
- </span>
- <br />
- {{ $t("settings.members.change-role-provider-to-vcs.content") }}
- </div>
- </template>
- </NModal>
-
- <div
- v-if="allowAddMember && project.roleProvider === 'BYTEBASE'"
- class="mt-4 w-full flex justify-start"
- >
+ <div v-if="allowAddMember" class="mt-4 w-full flex justify-start">
<!-- To prevent jiggling when showing the error text -->
<div :class="state.error ? 'space-y-1' : 'space-y-6'">
<div class="space-y-2">
@@ -171,8 +100,6 @@ import {
Project,
ProjectMember,
ProjectMemberCreate,
- ProjectPatch,
- ProjectRoleProvider,
ProjectRoleType,
UNKNOWN_ID,
} from "../types";
@@ -192,7 +119,6 @@ interface LocalState {
role: ProjectRoleType;
error: string;
showModal: boolean;
- roleProvider: boolean;
previewMember: boolean;
showFeatureModal: boolean;
}
@@ -217,7 +143,6 @@ export default defineComponent({
role: "DEVELOPER",
error: "",
showModal: false,
- roleProvider: false,
previewMember: false,
showFeatureModal: false,
});
@@ -246,11 +171,7 @@ export default defineComponent({
}
for (const member of props.project.memberList) {
- if (
- member.principal.id == currentUser.value.id &&
- // only member with the same role provider as that of the project will be consider a valid member
- member.roleProvider === props.project.roleProvider
- ) {
+ if (member.principal.id == currentUser.value.id) {
if (
hasProjectPermission(
"bb.permission.project.manage-member",
@@ -264,10 +185,6 @@ export default defineComponent({
return false;
});
- const allowSyncVCS = computed(() => {
- return props.project.workflowType === "VCS" && allowAddMember.value;
- });
-
const hasValidMember = computed(() => {
return (
state.principalId != UNKNOWN_ID && validateInviteInternal().length == 0
@@ -300,7 +217,6 @@ export default defineComponent({
const projectMember: ProjectMemberCreate = {
principalId: state.principalId,
role: hasRBACFeature.value ? state.role : "OWNER",
- roleProvider: "BYTEBASE",
};
const member = useMemberStore().memberByPrincipalId(state.principalId);
projectStore
@@ -323,36 +239,6 @@ export default defineComponent({
state.error = "";
};
- // update project's role provider
- const patchProjectRoleProvider = (
- roleProvider: ProjectRoleProvider
- ): Promise<boolean> =>
- new Promise((resolve, reject) => {
- const projectPatch: ProjectPatch = { roleProvider: roleProvider };
- projectStore
- .patchProject({
- projectId: props.project.id,
- projectPatch,
- })
- .then((res) => {
- resolve(true);
- });
- });
-
- const syncMemberFromVCS = () => {
- projectStore
- .syncMemberRoleFromVCS({
- projectId: props.project.id,
- })
- .then(() => {
- pushNotification({
- module: "bytebase",
- style: "SUCCESS",
- title: t("project.settings.success-member-sync-prompt"),
- });
- });
- };
-
const openWindowForVCSMember = () => {
// currently we only support Gitlab, so the following redirect URL is fixed
useRepositoryStore()
@@ -363,72 +249,16 @@ export default defineComponent({
});
};
- const onRefreshSync = () => {
- if (!has3rdPartyAuthFeature.value) {
- state.showFeatureModal = true;
- return;
- }
- syncMemberFromVCS();
- };
-
- const onToggleRoleProvider = (on: boolean) => {
- if (!has3rdPartyAuthFeature.value && on) {
- state.showFeatureModal = true;
- return;
- }
- // we prompt a modal to let user double confirm this change
- state.showModal = true;
- if (!on) {
- // we preview member if user try to switch role provider to Bytebase
- state.previewMember = true;
- }
- };
-
- const onConfirmToggleRoleProvider = () => {
- state.showModal = false;
- // the current role provider is BYTEBASE, meaning switching role provider to VCS
- if (props.project.roleProvider === "BYTEBASE") {
- patchProjectRoleProvider("GITLAB_SELF_HOST")
- .then(() => {
- syncMemberFromVCS();
- })
- .catch(() => {
- // nothing todo
- }); // mute error at browser
- } else if (props.project.roleProvider === "GITLAB_SELF_HOST") {
- // the current role provider is GITLAB_SELF_HOST, meaning switching role provider to BYTEBASE
- patchProjectRoleProvider("BYTEBASE")
- .then(() => {
- pushNotification({
- module: "bytebase",
- style: "SUCCESS",
- title: t(
- "project.settings.switch-role-provider-to-bytebase-success-prompt"
- ),
- });
- })
- .catch(() => {
- // nothing todo
- }); // mute error at browser;
- }
- };
-
return {
state,
hasRBACFeature,
- allowSyncVCS,
allowAddMember,
validateMember,
clearValidationError,
hasValidMember,
addMember,
- syncMemberFromVCS,
openWindowForVCSMember,
- patchProjectRoleProvider,
has3rdPartyAuthFeature,
- onRefreshSync,
- onToggleRoleProvider,
- onConfirmToggleRoleProvider,
};
},
});
diff --git a/frontend/src/components/ProjectMemberTable.vue b/frontend/src/components/ProjectMemberTable.vue
index 582f561b03..63a9543273 100644
--- a/frontend/src/components/ProjectMemberTable.vue
+++ b/frontend/src/components/ProjectMemberTable.vue
@@ -86,23 +86,6 @@
<router-link :to="`/u/${member.updater.id}`" class="normal-link">{{
member.updater.name
}}</router-link>
- <!-- we only show user's role provider if hers is not Bytebase -->
- <template v-if="member.roleProvider == 'GITLAB_SELF_HOST'">
- <span>{{ $t("common.from") }}</span>
- <div class="tooltip-wrapper">
- <span class="tooltip w-60">
- {{
- $t("settings.members.tooltip.project-role-provider-gitlab", {
- rawRole: member.payload.vcsRole,
- })
- }}
- </span>
- <img
- class="w-4 ml-1"
- :src="RoleProviderConfig[member.roleProvider].iconPath"
- />
- </div>
- </template>
</div>
</BBTableCell>
<BBTableCell>
@@ -128,7 +111,6 @@ import {
ProjectRoleType,
MemberId,
ProjectMemberPatch,
- ProjectRoleProvider,
} from "../types";
import { BBTableColumn, BBTableSectionDataSource } from "../bbkit/types";
import { hasWorkspacePermission, hasProjectPermission } from "../utils";
@@ -151,11 +133,6 @@ export default defineComponent({
required: true,
type: Object as PropType<Project>,
},
- activeRoleProvider: {
- require: false,
- default: null,
- type: String as PropType<ProjectRoleProvider>,
- },
},
setup(props) {
const { t } = useI18n();
@@ -167,34 +144,11 @@ export default defineComponent({
const state = reactive<LocalState>({});
- const activeRoleProvider = computed(() => {
- // if props.activeRoleProvider is not passed as a property, we will use props.project.roleProvider by default
- return props.activeRoleProvider
- ? props.activeRoleProvider
- : props.project.roleProvider;
- });
-
- const RoleProviderConfig = {
- GITLAB_SELF_HOST: {
- // see https://vitejs.cn/guide/assets.html#the-public-directory for static resource import during run time
- iconPath: new URL("../assets/gitlab-logo.svg", import.meta.url).href,
- },
- BYTEBASE: {
- // see https://vitejs.cn/guide/assets.html#the-public-directory for static resource import during run time
- iconPath: "",
- },
- };
-
const dataSource = computed(
(): BBTableSectionDataSource<ProjectMember>[] => {
const ownerList: ProjectMember[] = [];
const developerList: ProjectMember[] = [];
for (const member of props.project.memberList) {
- // only member with the same role provider as the active one would be consider a valid member
- if (member.roleProvider !== activeRoleProvider.value) {
- continue;
- }
-
if (member.role == "OWNER") {
ownerList.push(member);
}
@@ -262,9 +216,6 @@ export default defineComponent({
if (props.project.rowStatus == "ARCHIVED") {
return false;
}
- if (props.project.roleProvider !== "BYTEBASE") {
- return false;
- }
if (role == "OWNER" && dataSource.value[0].list.length <= 1) {
return false;
@@ -298,7 +249,6 @@ export default defineComponent({
const changeRole = (id: MemberId, role: ProjectRoleType) => {
const projectMemberPatch: ProjectMemberPatch = {
role,
- roleProvider: "BYTEBASE",
};
projectStore.patchMember({
projectId: props.project.id,
@@ -321,7 +271,6 @@ export default defineComponent({
return {
state,
- RoleProviderConfig,
currentUser,
hasRBACFeature,
columnList,
diff --git a/frontend/src/store/modules/project.ts b/frontend/src/store/modules/project.ts
index a65bd9332a..97d83217ea 100644
--- a/frontend/src/store/modules/project.ts
+++ b/frontend/src/store/modules/project.ts
@@ -38,7 +38,6 @@ function convert(
visibility: attrs.visibility,
tenantMode: attrs.tenantMode,
dbNameTemplate: attrs.dbNameTemplate,
- roleProvider: attrs.roleProvider,
schemaChangeType: attrs.schemaChangeType,
lgtmCheckSetting: attrs.lgtmCheckSetting,
};
@@ -102,8 +101,6 @@ function convertMember(
projectMember.relationships!.principal.data,
includedList
),
- roleProvider: attrs.roleProvider,
- payload: JSON.parse((attrs.payload as unknown as string) || "{}"),
};
}
diff --git a/frontend/src/types/common.ts b/frontend/src/types/common.ts
index 268bdc49d1..f422609af5 100644
--- a/frontend/src/types/common.ts
+++ b/frontend/src/types/common.ts
@@ -13,12 +13,7 @@ import { Issue } from "./issue";
import { Member } from "./member";
import { Pipeline, Stage, Task, TaskProgress } from "./pipeline";
import { Principal } from "./principal";
-import {
- Project,
- ProjectMember,
- EmptyProjectRoleProviderPayload,
- getDefaultLGTMCheckSetting,
-} from "./project";
+import { Project, ProjectMember, getDefaultLGTMCheckSetting } from "./project";
import { ProjectWebhook } from "./projectWebhook";
import { Repository } from "./repository";
import { VCS } from "./vcs";
@@ -200,7 +195,6 @@ const makeUnknown = (type: ResourceType) => {
visibility: "PUBLIC",
tenantMode: "DISABLED",
dbNameTemplate: "",
- roleProvider: "BYTEBASE",
schemaChangeType: "DDL",
lgtmCheckSetting: getDefaultLGTMCheckSetting(),
};
@@ -223,8 +217,6 @@ const makeUnknown = (type: ResourceType) => {
updatedTs: 0,
role: "DEVELOPER",
principal: UNKNOWN_PRINCIPAL,
- roleProvider: "BYTEBASE",
- payload: EmptyProjectRoleProviderPayload,
};
const UNKNOWN_INSTANCE: Instance = {
@@ -580,7 +572,6 @@ const makeEmpty = (type: ResourceType) => {
visibility: "PUBLIC",
tenantMode: "DISABLED",
dbNameTemplate: "",
- roleProvider: "BYTEBASE",
schemaChangeType: "DDL",
lgtmCheckSetting: getDefaultLGTMCheckSetting(),
};
@@ -603,8 +594,6 @@ const makeEmpty = (type: ResourceType) => {
updatedTs: 0,
role: "DEVELOPER",
principal: EMPTY_PRINCIPAL,
- roleProvider: "BYTEBASE",
- payload: EmptyProjectRoleProviderPayload,
};
const EMPTY_INSTANCE: Instance = {
diff --git a/frontend/src/types/project.ts b/frontend/src/types/project.ts
index 84c027aea6..8eea328499 100644
--- a/frontend/src/types/project.ts
+++ b/frontend/src/types/project.ts
@@ -13,11 +13,6 @@ export type ProjectVisibility = "PUBLIC" | "PRIVATE";
export type ProjectTenantMode = "DISABLED" | "TENANT";
-export type ProjectRoleProvider =
- | "GITLAB_SELF_HOST"
- | "GITHUB_COM"
- | "BYTEBASE";
-
export type SchemaChangeType = "DDL" | "SDL";
export type LGTMCheckValue = "DISABLED" | "PROJECT_OWNER" | "PROJECT_MEMBER";
@@ -26,16 +21,6 @@ export type LGTMCheckSetting = {
value: LGTMCheckValue;
};
-export type ProjectRoleProviderPayload = {
- vcsRole: string;
- lastSyncTs: number;
-};
-
-export const EmptyProjectRoleProviderPayload: ProjectRoleProviderPayload = {
- vcsRole: "",
- lastSyncTs: 0,
-};
-
// Project
export type Project = {
id: ProjectId;
@@ -52,7 +37,6 @@ export type Project = {
visibility: ProjectVisibility;
tenantMode: ProjectTenantMode;
dbNameTemplate: string;
- roleProvider: ProjectRoleProvider;
schemaChangeType: SchemaChangeType;
lgtmCheckSetting: LGTMCheckSetting;
};
@@ -69,7 +53,6 @@ export type ProjectCreate = {
key: string;
tenantMode: ProjectTenantMode;
dbNameTemplate: string;
- roleProvider: ProjectRoleProvider;
schemaChangeType: SchemaChangeType;
};
@@ -80,7 +63,6 @@ export type ProjectPatch = {
// Domain specific fields
name?: string;
key?: string;
- roleProvider?: ProjectRoleProvider;
schemaChangeType?: SchemaChangeType;
lgtmCheckSetting?: LGTMCheckSetting;
dbNameTemplate?: string;
@@ -102,21 +84,17 @@ export type ProjectMember = {
// Domain specific fields
role: ProjectRoleType;
principal: Principal;
- roleProvider: ProjectRoleProvider;
- payload: ProjectRoleProviderPayload;
};
export type ProjectMemberCreate = {
// Domain specific fields
principalId: PrincipalId;
role: ProjectRoleType;
- roleProvider: ProjectRoleProvider;
};
export type ProjectMemberPatch = {
// Domain specific fields
role: ProjectRoleType;
- roleProvider: ProjectRoleProvider;
};
export type ProjectRepositoryConfig = {
diff --git a/frontend/src/types/proto/v1/project_service.ts b/frontend/src/types/proto/v1/project_service.ts
index 9da3e454f4..e96b798045 100644
--- a/frontend/src/types/proto/v1/project_service.ts
+++ b/frontend/src/types/proto/v1/project_service.ts
@@ -125,51 +125,6 @@ export function tenantModeToJSON(object: TenantMode): string {
}
}
-export enum RoleProvider {
- ROLE_PROVIDER_UNSPECIFIED = 0,
- BYTEBASE = 1,
- GITLAB_SELF_HOST = 2,
- GITHUB_COM = 3,
- UNRECOGNIZED = -1,
-}
-
-export function roleProviderFromJSON(object: any): RoleProvider {
- switch (object) {
- case 0:
- case "ROLE_PROVIDER_UNSPECIFIED":
- return RoleProvider.ROLE_PROVIDER_UNSPECIFIED;
- case 1:
- case "BYTEBASE":
- return RoleProvider.BYTEBASE;
- case 2:
- case "GITLAB_SELF_HOST":
- return RoleProvider.GITLAB_SELF_HOST;
- case 3:
- case "GITHUB_COM":
- return RoleProvider.GITHUB_COM;
- case -1:
- case "UNRECOGNIZED":
- default:
- return RoleProvider.UNRECOGNIZED;
- }
-}
-
-export function roleProviderToJSON(object: RoleProvider): string {
- switch (object) {
- case RoleProvider.ROLE_PROVIDER_UNSPECIFIED:
- return "ROLE_PROVIDER_UNSPECIFIED";
- case RoleProvider.BYTEBASE:
- return "BYTEBASE";
- case RoleProvider.GITLAB_SELF_HOST:
- return "GITLAB_SELF_HOST";
- case RoleProvider.GITHUB_COM:
- return "GITHUB_COM";
- case RoleProvider.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
export enum SchemaVersion {
SCHEMA_VERSION_UNSPECIFIED = 0,
TIMESTAMP = 1,
@@ -498,7 +453,6 @@ export interface Project {
visibility: Visibility;
tenantMode: TenantMode;
dbNameTemplate: string;
- roleProvider: RoleProvider;
schemaVersion: SchemaVersion;
schemaChange: SchemaChange;
lgtmCheck: LgtmCheck;
@@ -1180,7 +1134,6 @@ function createBaseProject(): Project {
visibility: 0,
tenantMode: 0,
dbNameTemplate: "",
- roleProvider: 0,
schemaVersion: 0,
schemaChange: 0,
lgtmCheck: 0,
@@ -1216,17 +1169,14 @@ export const Project = {
if (message.dbNameTemplate !== "") {
writer.uint32(74).string(message.dbNameTemplate);
}
- if (message.roleProvider !== 0) {
- writer.uint32(80).int32(message.roleProvider);
- }
if (message.schemaVersion !== 0) {
- writer.uint32(88).int32(message.schemaVersion);
+ writer.uint32(80).int32(message.schemaVersion);
}
if (message.schemaChange !== 0) {
- writer.uint32(96).int32(message.schemaChange);
+ writer.uint32(88).int32(message.schemaChange);
}
if (message.lgtmCheck !== 0) {
- writer.uint32(104).int32(message.lgtmCheck);
+ writer.uint32(96).int32(message.lgtmCheck);
}
return writer;
},
@@ -1266,15 +1216,12 @@ export const Project = {
message.dbNameTemplate = reader.string();
break;
case 10:
- message.roleProvider = reader.int32() as any;
- break;
- case 11:
message.schemaVersion = reader.int32() as any;
break;
- case 12:
+ case 11:
message.schemaChange = reader.int32() as any;
break;
- case 13:
+ case 12:
message.lgtmCheck = reader.int32() as any;
break;
default:
@@ -1296,7 +1243,6 @@ export const Project = {
visibility: isSet(object.visibility) ? visibilityFromJSON(object.visibility) : 0,
tenantMode: isSet(object.tenantMode) ? tenantModeFromJSON(object.tenantMode) : 0,
dbNameTemplate: isSet(object.dbNameTemplate) ? String(object.dbNameTemplate) : "",
- roleProvider: isSet(object.roleProvider) ? roleProviderFromJSON(object.roleProvider) : 0,
schemaVersion: isSet(object.schemaVersion) ? schemaVersionFromJSON(object.schemaVersion) : 0,
schemaChange: isSet(object.schemaChange) ? schemaChangeFromJSON(object.schemaChange) : 0,
lgtmCheck: isSet(object.lgtmCheck) ? lgtmCheckFromJSON(object.lgtmCheck) : 0,
@@ -1314,7 +1260,6 @@ export const Project = {
message.visibility !== undefined && (obj.visibility = visibilityToJSON(message.visibility));
message.tenantMode !== undefined && (obj.tenantMode = tenantModeToJSON(message.tenantMode));
message.dbNameTemplate !== undefined && (obj.dbNameTemplate = message.dbNameTemplate);
- message.roleProvider !== undefined && (obj.roleProvider = roleProviderToJSON(message.roleProvider));
message.schemaVersion !== undefined && (obj.schemaVersion = schemaVersionToJSON(message.schemaVersion));
message.schemaChange !== undefined && (obj.schemaChange = schemaChangeToJSON(message.schemaChange));
message.lgtmCheck !== undefined && (obj.lgtmCheck = lgtmCheckToJSON(message.lgtmCheck));
@@ -1332,7 +1277,6 @@ export const Project = {
message.visibility = object.visibility ?? 0;
message.tenantMode = object.tenantMode ?? 0;
message.dbNameTemplate = object.dbNameTemplate ?? "";
- message.roleProvider = object.roleProvider ?? 0;
message.schemaVersion = object.schemaVersion ?? 0;
message.schemaChange = object.schemaChange ?? 0;
message.lgtmCheck = object.lgtmCheck ?? 0;
diff --git a/frontend/src/utils/principal.ts b/frontend/src/utils/principal.ts
index 52eabc3c35..6465fac8c4 100644
--- a/frontend/src/utils/principal.ts
+++ b/frontend/src/utils/principal.ts
@@ -7,9 +7,7 @@ export const isOwnerOfProject = (
return (
project.memberList.findIndex(
(member) =>
- member.roleProvider === project.roleProvider &&
- member.role === "OWNER" &&
- member.principal.id === principal.id
+ member.role === "OWNER" && member.principal.id === principal.id
) >= 0
);
};
diff --git a/plugin/vcs/github/github.go b/plugin/vcs/github/github.go
index 84fc55682f..3c934551aa 100644
--- a/plugin/vcs/github/github.go
+++ b/plugin/vcs/github/github.go
@@ -436,12 +436,11 @@ func (p *Provider) FetchRepositoryActiveMemberList(ctx context.Context, oauthCtx
githubRole, bytebaseRole := getRoleAndMappedRole(c.RoleName)
allMembers = append(allMembers,
&vcs.RepositoryMember{
- Name: userInfo.Name,
- Email: userInfo.PublicEmail,
- Role: bytebaseRole,
- VCSRole: string(githubRole),
- State: vcs.StateActive,
- RoleProvider: vcs.GitHubCom,
+ Name: userInfo.Name,
+ Email: userInfo.PublicEmail,
+ Role: bytebaseRole,
+ VCSRole: string(githubRole),
+ State: vcs.StateActive,
},
)
}
diff --git a/plugin/vcs/github/github_test.go b/plugin/vcs/github/github_test.go
index 39640d989b..35ed4b7a1a 100644
--- a/plugin/vcs/github/github_test.go
+++ b/plugin/vcs/github/github_test.go
@@ -301,12 +301,11 @@ func TestProvider_FetchRepositoryActiveMemberList(t *testing.T) {
want := []*vcs.RepositoryMember{
{
- Email: "[email protected]",
- Name: "monalisa octocat",
- State: vcs.StateActive,
- Role: common.ProjectOwner,
- VCSRole: string(RepositoryRoleWrite),
- RoleProvider: vcs.GitHubCom,
+ Email: "[email protected]",
+ Name: "monalisa octocat",
+ State: vcs.StateActive,
+ Role: common.ProjectOwner,
+ VCSRole: string(RepositoryRoleWrite),
},
}
assert.Equal(t, want, got)
diff --git a/plugin/vcs/gitlab/gitlab.go b/plugin/vcs/gitlab/gitlab.go
index a154c55bd4..7789d8e046 100644
--- a/plugin/vcs/gitlab/gitlab.go
+++ b/plugin/vcs/gitlab/gitlab.go
@@ -554,12 +554,11 @@ func (p *Provider) FetchRepositoryActiveMemberList(ctx context.Context, oauthCtx
activeMembers = append(
activeMembers,
&vcs.RepositoryMember{
- Name: m.Name,
- Email: m.Email,
- Role: bytebaseRole,
- VCSRole: string(gitlabRole),
- State: vcs.StateActive,
- RoleProvider: vcs.GitLabSelfHost,
+ Name: m.Name,
+ Email: m.Email,
+ Role: bytebaseRole,
+ VCSRole: string(gitlabRole),
+ State: vcs.StateActive,
},
)
}
diff --git a/plugin/vcs/gitlab/gitlab_test.go b/plugin/vcs/gitlab/gitlab_test.go
index ea29da2b88..c14884bbc8 100644
--- a/plugin/vcs/gitlab/gitlab_test.go
+++ b/plugin/vcs/gitlab/gitlab_test.go
@@ -239,12 +239,11 @@ func TestProvider_FetchRepositoryActiveMemberList(t *testing.T) {
// Non-active member should be excluded
want := []*vcs.RepositoryMember{
{
- Email: "[email protected]",
- Name: "Raymond Smith",
- State: vcs.StateActive,
- Role: common.ProjectDeveloper,
- VCSRole: string(ProjectRoleDeveloper),
- RoleProvider: vcs.GitLabSelfHost,
+ Email: "[email protected]",
+ Name: "Raymond Smith",
+ State: vcs.StateActive,
+ Role: common.ProjectDeveloper,
+ VCSRole: string(ProjectRoleDeveloper),
},
}
assert.Equal(t, want, got)
diff --git a/plugin/vcs/vcs.go b/plugin/vcs/vcs.go
index 6bd2e80213..cb6d2e2759 100644
--- a/plugin/vcs/vcs.go
+++ b/plugin/vcs/vcs.go
@@ -146,12 +146,11 @@ type UserInfo struct {
// RepositoryMember is the API message for repository member info.
type RepositoryMember struct {
- Email string `json:"email"`
- Name string `json:"name"`
- State State `json:"state"`
- Role common.ProjectRole `json:"role"`
- VCSRole string `json:"vcsRole"`
- RoleProvider Type `json:"roleProvider"`
+ Email string `json:"email"`
+ Name string `json:"name"`
+ State State `json:"state"`
+ Role common.ProjectRole `json:"role"`
+ VCSRole string `json:"vcsRole"`
}
// Repository is the API message for repository info.
diff --git a/proto/generated-go/v1/project_service.pb.go b/proto/generated-go/v1/project_service.pb.go
index 7387a59de9..0973dda00d 100644
--- a/proto/generated-go/v1/project_service.pb.go
+++ b/proto/generated-go/v1/project_service.pb.go
@@ -171,58 +171,6 @@ func (TenantMode) EnumDescriptor() ([]byte, []int) {
return file_v1_project_service_proto_rawDescGZIP(), []int{2}
}
-type RoleProvider int32
-
-const (
- RoleProvider_ROLE_PROVIDER_UNSPECIFIED RoleProvider = 0
- RoleProvider_BYTEBASE RoleProvider = 1
- RoleProvider_GITLAB_SELF_HOST RoleProvider = 2
- RoleProvider_GITHUB_COM RoleProvider = 3
-)
-
-// Enum value maps for RoleProvider.
-var (
- RoleProvider_name = map[int32]string{
- 0: "ROLE_PROVIDER_UNSPECIFIED",
- 1: "BYTEBASE",
- 2: "GITLAB_SELF_HOST",
- 3: "GITHUB_COM",
- }
- RoleProvider_value = map[string]int32{
- "ROLE_PROVIDER_UNSPECIFIED": 0,
- "BYTEBASE": 1,
- "GITLAB_SELF_HOST": 2,
- "GITHUB_COM": 3,
- }
-)
-
-func (x RoleProvider) Enum() *RoleProvider {
- p := new(RoleProvider)
- *p = x
- return p
-}
-
-func (x RoleProvider) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (RoleProvider) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_project_service_proto_enumTypes[3].Descriptor()
-}
-
-func (RoleProvider) Type() protoreflect.EnumType {
- return &file_v1_project_service_proto_enumTypes[3]
-}
-
-func (x RoleProvider) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Use RoleProvider.Descriptor instead.
-func (RoleProvider) EnumDescriptor() ([]byte, []int) {
- return file_v1_project_service_proto_rawDescGZIP(), []int{3}
-}
-
type SchemaVersion int32
const (
@@ -256,11 +204,11 @@ func (x SchemaVersion) String() string {
}
func (SchemaVersion) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_project_service_proto_enumTypes[4].Descriptor()
+ return file_v1_project_service_proto_enumTypes[3].Descriptor()
}
func (SchemaVersion) Type() protoreflect.EnumType {
- return &file_v1_project_service_proto_enumTypes[4]
+ return &file_v1_project_service_proto_enumTypes[3]
}
func (x SchemaVersion) Number() protoreflect.EnumNumber {
@@ -269,7 +217,7 @@ func (x SchemaVersion) Number() protoreflect.EnumNumber {
// Deprecated: Use SchemaVersion.Descriptor instead.
func (SchemaVersion) EnumDescriptor() ([]byte, []int) {
- return file_v1_project_service_proto_rawDescGZIP(), []int{4}
+ return file_v1_project_service_proto_rawDescGZIP(), []int{3}
}
type SchemaChange int32
@@ -305,11 +253,11 @@ func (x SchemaChange) String() string {
}
func (SchemaChange) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_project_service_proto_enumTypes[5].Descriptor()
+ return file_v1_project_service_proto_enumTypes[4].Descriptor()
}
func (SchemaChange) Type() protoreflect.EnumType {
- return &file_v1_project_service_proto_enumTypes[5]
+ return &file_v1_project_service_proto_enumTypes[4]
}
func (x SchemaChange) Number() protoreflect.EnumNumber {
@@ -318,7 +266,7 @@ func (x SchemaChange) Number() protoreflect.EnumNumber {
// Deprecated: Use SchemaChange.Descriptor instead.
func (SchemaChange) EnumDescriptor() ([]byte, []int) {
- return file_v1_project_service_proto_rawDescGZIP(), []int{5}
+ return file_v1_project_service_proto_rawDescGZIP(), []int{4}
}
type LgtmCheck int32
@@ -357,11 +305,11 @@ func (x LgtmCheck) String() string {
}
func (LgtmCheck) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_project_service_proto_enumTypes[6].Descriptor()
+ return file_v1_project_service_proto_enumTypes[5].Descriptor()
}
func (LgtmCheck) Type() protoreflect.EnumType {
- return &file_v1_project_service_proto_enumTypes[6]
+ return &file_v1_project_service_proto_enumTypes[5]
}
func (x LgtmCheck) Number() protoreflect.EnumNumber {
@@ -370,7 +318,7 @@ func (x LgtmCheck) Number() protoreflect.EnumNumber {
// Deprecated: Use LgtmCheck.Descriptor instead.
func (LgtmCheck) EnumDescriptor() ([]byte, []int) {
- return file_v1_project_service_proto_rawDescGZIP(), []int{6}
+ return file_v1_project_service_proto_rawDescGZIP(), []int{5}
}
type ProjectRole int32
@@ -406,11 +354,11 @@ func (x ProjectRole) String() string {
}
func (ProjectRole) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_project_service_proto_enumTypes[7].Descriptor()
+ return file_v1_project_service_proto_enumTypes[6].Descriptor()
}
func (ProjectRole) Type() protoreflect.EnumType {
- return &file_v1_project_service_proto_enumTypes[7]
+ return &file_v1_project_service_proto_enumTypes[6]
}
func (x ProjectRole) Number() protoreflect.EnumNumber {
@@ -419,7 +367,7 @@ func (x ProjectRole) Number() protoreflect.EnumNumber {
// Deprecated: Use ProjectRole.Descriptor instead.
func (ProjectRole) EnumDescriptor() ([]byte, []int) {
- return file_v1_project_service_proto_rawDescGZIP(), []int{7}
+ return file_v1_project_service_proto_rawDescGZIP(), []int{6}
}
type ReviewStatus int32
@@ -458,11 +406,11 @@ func (x ReviewStatus) String() string {
}
func (ReviewStatus) Descriptor() protoreflect.EnumDescriptor {
- return file_v1_project_service_proto_enumTypes[8].Descriptor()
+ return file_v1_project_service_proto_enumTypes[7].Descriptor()
}
func (ReviewStatus) Type() protoreflect.EnumType {
- return &file_v1_project_service_proto_enumTypes[8]
+ return &file_v1_project_service_proto_enumTypes[7]
}
func (x ReviewStatus) Number() protoreflect.EnumNumber {
@@ -471,7 +419,7 @@ func (x ReviewStatus) Number() protoreflect.EnumNumber {
// Deprecated: Use ReviewStatus.Descriptor instead.
func (ReviewStatus) EnumDescriptor() ([]byte, []int) {
- return file_v1_project_service_proto_rawDescGZIP(), []int{8}
+ return file_v1_project_service_proto_rawDescGZIP(), []int{7}
}
type GetProjectRequest struct {
@@ -1047,10 +995,9 @@ type Project struct {
Visibility Visibility `protobuf:"varint,7,opt,name=visibility,proto3,enum=bytebase.v1.Visibility" json:"visibility,omitempty"`
TenantMode TenantMode `protobuf:"varint,8,opt,name=tenant_mode,json=tenantMode,proto3,enum=bytebase.v1.TenantMode" json:"tenant_mode,omitempty"`
DbNameTemplate string `protobuf:"bytes,9,opt,name=db_name_template,json=dbNameTemplate,proto3" json:"db_name_template,omitempty"`
- RoleProvider RoleProvider `protobuf:"varint,10,opt,name=role_provider,json=roleProvider,proto3,enum=bytebase.v1.RoleProvider" json:"role_provider,omitempty"`
- SchemaVersion SchemaVersion `protobuf:"varint,11,opt,name=schema_version,json=schemaVersion,proto3,enum=bytebase.v1.SchemaVersion" json:"schema_version,omitempty"`
- SchemaChange SchemaChange `protobuf:"varint,12,opt,name=schema_change,json=schemaChange,proto3,enum=bytebase.v1.SchemaChange" json:"schema_change,omitempty"`
- LgtmCheck LgtmCheck `protobuf:"varint,13,opt,name=lgtm_check,json=lgtmCheck,proto3,enum=bytebase.v1.LgtmCheck" json:"lgtm_check,omitempty"`
+ SchemaVersion SchemaVersion `protobuf:"varint,10,opt,name=schema_version,json=schemaVersion,proto3,enum=bytebase.v1.SchemaVersion" json:"schema_version,omitempty"`
+ SchemaChange SchemaChange `protobuf:"varint,11,opt,name=schema_change,json=schemaChange,proto3,enum=bytebase.v1.SchemaChange" json:"schema_change,omitempty"`
+ LgtmCheck LgtmCheck `protobuf:"varint,12,opt,name=lgtm_check,json=lgtmCheck,proto3,enum=bytebase.v1.LgtmCheck" json:"lgtm_check,omitempty"`
}
func (x *Project) Reset() {
@@ -1148,13 +1095,6 @@ func (x *Project) GetDbNameTemplate() string {
return ""
}
-func (x *Project) GetRoleProvider() RoleProvider {
- if x != nil {
- return x.RoleProvider
- }
- return RoleProvider_ROLE_PROVIDER_UNSPECIFIED
-}
-
func (x *Project) GetSchemaVersion() SchemaVersion {
if x != nil {
return x.SchemaVersion
@@ -1843,7 +1783,7 @@ var file_v1_project_service_proto_rawDesc = []byte{
0x6e, 0x63, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x07, 0x70, 0x72,
0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01,
- 0x02, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xd1, 0x04, 0x0a, 0x07, 0x50,
+ 0x02, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x91, 0x04, 0x0a, 0x07, 0x50,
0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x03, 0x75, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x03, 0x75,
@@ -1865,20 +1805,16 @@ var file_v1_project_service_proto_rawDesc = []byte{
0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x64, 0x62,
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x09,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x65, 0x6d, 0x70,
- 0x6c, 0x61, 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f,
- 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72,
- 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x72, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x76,
- 0x69, 0x64, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76,
- 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x62,
+ 0x6c, 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x62,
0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d,
0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19,
+ 0x61, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19,
0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68,
0x65, 0x6d, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d,
0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x6c, 0x67, 0x74, 0x6d, 0x5f,
- 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x62, 0x79,
+ 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x62, 0x79,
0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x67, 0x74, 0x6d, 0x43, 0x68,
0x65, 0x63, 0x6b, 0x52, 0x09, 0x6c, 0x67, 0x74, 0x6d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x22, 0x3d,
0x0a, 0x09, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x30, 0x0a, 0x08, 0x62,
@@ -1969,147 +1905,141 @@ var file_v1_project_service_proto_rawDesc = []byte{
0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x54, 0x5f, 0x4d,
0x4f, 0x44, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x17,
0x0a, 0x13, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x4e,
- 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x61, 0x0a, 0x0c, 0x52, 0x6f, 0x6c, 0x65, 0x50,
- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x4f, 0x4c, 0x45, 0x5f,
- 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
- 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x59, 0x54, 0x45, 0x42, 0x41,
- 0x53, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x49, 0x54, 0x4c, 0x41, 0x42, 0x5f, 0x53,
- 0x45, 0x4c, 0x46, 0x5f, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x49,
- 0x54, 0x48, 0x55, 0x42, 0x5f, 0x43, 0x4f, 0x4d, 0x10, 0x03, 0x2a, 0x4c, 0x0a, 0x0d, 0x53, 0x63,
- 0x68, 0x65, 0x6d, 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x1a, 0x53,
- 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e,
- 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54,
- 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x45,
- 0x4d, 0x41, 0x4e, 0x54, 0x49, 0x43, 0x10, 0x02, 0x2a, 0x3f, 0x0a, 0x0c, 0x53, 0x63, 0x68, 0x65,
- 0x6d, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x43, 0x48, 0x45,
- 0x4d, 0x41, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
- 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x44, 0x4c, 0x10, 0x01,
- 0x12, 0x07, 0x0a, 0x03, 0x53, 0x44, 0x4c, 0x10, 0x02, 0x2a, 0x7d, 0x0a, 0x09, 0x4c, 0x67, 0x74,
- 0x6d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1a, 0x0a, 0x16, 0x4c, 0x47, 0x54, 0x4d, 0x5f, 0x43,
- 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
- 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4c, 0x47, 0x54, 0x4d, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b,
- 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x4c,
- 0x47, 0x54, 0x4d, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43,
- 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x4c, 0x47, 0x54,
- 0x4d, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f,
- 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x5f, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6a,
- 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x4a, 0x45,
- 0x43, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
- 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54,
- 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1a, 0x0a,
- 0x16, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x44, 0x45,
- 0x56, 0x45, 0x4c, 0x4f, 0x50, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x4f, 0x0a, 0x0c, 0x52, 0x65, 0x76,
- 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x45, 0x56,
- 0x49, 0x45, 0x57, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
- 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, 0x4e,
- 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08,
- 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x32, 0x88, 0x0d, 0x0a, 0x0e, 0x50,
- 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a,
- 0x0a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f,
- 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
- 0x74, 0x22, 0x24, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17,
- 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a,
- 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6c, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50,
- 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
- 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a,
- 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0xda, 0x41,
- 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f,
- 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x6a, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50,
- 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65,
- 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22,
- 0x20, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x07, 0x70, 0x72, 0x6f, 0x6a,
- 0x65, 0x63, 0x74, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
- 0x73, 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a,
+ 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x4c, 0x0a, 0x0d, 0x53, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x43, 0x48, 0x45,
+ 0x4d, 0x41, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
+ 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45,
+ 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x45, 0x4d, 0x41, 0x4e,
+ 0x54, 0x49, 0x43, 0x10, 0x02, 0x2a, 0x3f, 0x0a, 0x0c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43,
+ 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f,
+ 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
+ 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x44, 0x4c, 0x10, 0x01, 0x12, 0x07, 0x0a,
+ 0x03, 0x53, 0x44, 0x4c, 0x10, 0x02, 0x2a, 0x7d, 0x0a, 0x09, 0x4c, 0x67, 0x74, 0x6d, 0x43, 0x68,
+ 0x65, 0x63, 0x6b, 0x12, 0x1a, 0x0a, 0x16, 0x4c, 0x47, 0x54, 0x4d, 0x5f, 0x43, 0x48, 0x45, 0x43,
+ 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
+ 0x17, 0x0a, 0x13, 0x4c, 0x47, 0x54, 0x4d, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x44, 0x49,
+ 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x4c, 0x47, 0x54, 0x4d,
+ 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f,
+ 0x57, 0x4e, 0x45, 0x52, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x4c, 0x47, 0x54, 0x4d, 0x5f, 0x43,
+ 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x45, 0x4d,
+ 0x42, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x5f, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+ 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f,
+ 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
+ 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x4f,
+ 0x4c, 0x45, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52,
+ 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x45, 0x4c,
+ 0x4f, 0x50, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x4f, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77,
+ 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57,
+ 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
+ 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12,
+ 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e,
+ 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x32, 0x88, 0x0d, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6a,
+ 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0a, 0x47, 0x65,
+ 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x24,
+ 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f,
+ 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+ 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6c, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a,
+ 0x65, 0x63, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0xda, 0x41, 0x00, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+ 0x74, 0x73, 0x12, 0x6a, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a,
0x65, 0x63, 0x74, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52,
+ 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x44, 0xda, 0x41,
- 0x13, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,
- 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07, 0x70, 0x72, 0x6f, 0x6a,
- 0x65, 0x63, 0x74, 0x32, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
- 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,
- 0x2a, 0x7d, 0x12, 0x70, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a,
- 0x65, 0x63, 0x74, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24,
- 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x2a, 0x15, 0x2f,
- 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
- 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x77, 0x0a, 0x0f, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
- 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72,
- 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65,
- 0x63, 0x74, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f,
- 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
- 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x77, 0x0a,
- 0x0c, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49,
- 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x61,
- 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12,
- 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, 0x70, 0x72,
- 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x74, 0x49, 0x61, 0x6d,
- 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x7a, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d,
- 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63,
- 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
- 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x01, 0x2a, 0x22, 0x25, 0x2f, 0x76, 0x31,
- 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
- 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69,
- 0x63, 0x79, 0x12, 0x95, 0x01, 0x0a, 0x15, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x78, 0x74, 0x65, 0x72,
- 0x6e, 0x61, 0x6c, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x29, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x45,
- 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22,
- 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x3a, 0x01, 0x2a, 0x22, 0x2e, 0x2f, 0x76, 0x31, 0x2f,
- 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
- 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
- 0x6c, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x6f, 0x0a, 0x09, 0x47, 0x65,
- 0x74, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x22, 0x2e, 0xda, 0x41, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x76, 0x31, 0x2f,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x20, 0xda, 0x41,
+ 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+ 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x8e,
+ 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+ 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x44, 0xda, 0x41, 0x13, 0x70, 0x72,
+ 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73,
+ 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+ 0x32, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x6e,
+ 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12,
+ 0x70, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+ 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24, 0xda, 0x41, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x2a, 0x15, 0x2f, 0x76, 0x31, 0x2f,
0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,
- 0x2f, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x0b,
- 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x12, 0x1f, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
- 0x76, 0x69, 0x65, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52,
- 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30,
- 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12,
- 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f,
- 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x73,
- 0x12, 0x92, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x69, 0x65,
- 0x77, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75,
+ 0x7d, 0x12, 0x77, 0x0a, 0x0f, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f,
+ 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65,
+ 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22,
+ 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f,
+ 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,
+ 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x77, 0x0a, 0x0c, 0x47, 0x65,
+ 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50,
+ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x61, 0x6d, 0x50, 0x6f,
+ 0x6c, 0x69, 0x63, 0x79, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76,
+ 0x31, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,
+ 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x12, 0x7a, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x30, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x01, 0x2a, 0x22, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70,
+ 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,
+ 0x2a, 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12,
+ 0x95, 0x01, 0x0a, 0x15, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
+ 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x78, 0x74, 0x65,
+ 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x39, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x33, 0x3a, 0x01, 0x2a, 0x22, 0x2e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x72,
+ 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,
+ 0x7d, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x61,
+ 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x6f, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x52, 0x65,
+ 0x76, 0x69, 0x65, 0x77, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x22, 0x4b, 0xda, 0x41, 0x12, 0x72, 0x65, 0x76,
- 0x69, 0x65, 0x77, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x06, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x32, 0x26, 0x2f,
- 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x76, 0x69, 0x65,
- 0x77, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x12, 0x26, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68,
- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
- 0x76, 0x69, 0x65, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70,
- 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,
- 0x7d, 0x2f, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x55,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
- 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x31, 0x2e, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x22, 0x2e, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65,
+ 0x76, 0x69, 0x65, 0x77, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73,
+ 0x74, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x76, 0x69, 0x65,
+ 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x76, 0x69,
+ 0x65, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0xda, 0x41, 0x06,
+ 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x76,
+ 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+ 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x12, 0x92, 0x01,
+ 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x20,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52,
+ 0x65, 0x76, 0x69, 0x65, 0x77, 0x22, 0x4b, 0xda, 0x41, 0x12, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77,
+ 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x30, 0x3a, 0x06, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x32, 0x26, 0x2f, 0x76, 0x31, 0x2f,
+ 0x7b, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f,
+ 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x2f,
+ 0x2a, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x69, 0x65,
+ 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72,
+ 0x65, 0x76, 0x69, 0x65, 0x77, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d,
+ 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -2124,98 +2054,96 @@ func file_v1_project_service_proto_rawDescGZIP() []byte {
return file_v1_project_service_proto_rawDescData
}
-var file_v1_project_service_proto_enumTypes = make([]protoimpl.EnumInfo, 9)
+var file_v1_project_service_proto_enumTypes = make([]protoimpl.EnumInfo, 8)
var file_v1_project_service_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_v1_project_service_proto_goTypes = []interface{}{
(Workflow)(0), // 0: bytebase.v1.Workflow
(Visibility)(0), // 1: bytebase.v1.Visibility
(TenantMode)(0), // 2: bytebase.v1.TenantMode
- (RoleProvider)(0), // 3: bytebase.v1.RoleProvider
- (SchemaVersion)(0), // 4: bytebase.v1.SchemaVersion
- (SchemaChange)(0), // 5: bytebase.v1.SchemaChange
- (LgtmCheck)(0), // 6: bytebase.v1.LgtmCheck
- (ProjectRole)(0), // 7: bytebase.v1.ProjectRole
- (ReviewStatus)(0), // 8: bytebase.v1.ReviewStatus
- (*GetProjectRequest)(nil), // 9: bytebase.v1.GetProjectRequest
- (*ListProjectsRequest)(nil), // 10: bytebase.v1.ListProjectsRequest
- (*ListProjectsResponse)(nil), // 11: bytebase.v1.ListProjectsResponse
- (*CreateProjectRequest)(nil), // 12: bytebase.v1.CreateProjectRequest
- (*UpdateProjectRequest)(nil), // 13: bytebase.v1.UpdateProjectRequest
- (*DeleteProjectRequest)(nil), // 14: bytebase.v1.DeleteProjectRequest
- (*UndeleteProjectRequest)(nil), // 15: bytebase.v1.UndeleteProjectRequest
- (*GetIamPolicyRequest)(nil), // 16: bytebase.v1.GetIamPolicyRequest
- (*SetIamPolicyRequest)(nil), // 17: bytebase.v1.SetIamPolicyRequest
- (*SyncExternalIamPolicyRequest)(nil), // 18: bytebase.v1.SyncExternalIamPolicyRequest
- (*Project)(nil), // 19: bytebase.v1.Project
- (*IamPolicy)(nil), // 20: bytebase.v1.IamPolicy
- (*Binding)(nil), // 21: bytebase.v1.Binding
- (*GetReviewRequest)(nil), // 22: bytebase.v1.GetReviewRequest
- (*ListReviewsRequest)(nil), // 23: bytebase.v1.ListReviewsRequest
- (*ListReviewsResponse)(nil), // 24: bytebase.v1.ListReviewsResponse
- (*UpdateReviewRequest)(nil), // 25: bytebase.v1.UpdateReviewRequest
- (*BatchUpdateReviewsRequest)(nil), // 26: bytebase.v1.BatchUpdateReviewsRequest
- (*BatchUpdateReviewsResponse)(nil), // 27: bytebase.v1.BatchUpdateReviewsResponse
- (*Review)(nil), // 28: bytebase.v1.Review
- (*fieldmaskpb.FieldMask)(nil), // 29: google.protobuf.FieldMask
- (State)(0), // 30: bytebase.v1.State
- (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp
- (*emptypb.Empty)(nil), // 32: google.protobuf.Empty
+ (SchemaVersion)(0), // 3: bytebase.v1.SchemaVersion
+ (SchemaChange)(0), // 4: bytebase.v1.SchemaChange
+ (LgtmCheck)(0), // 5: bytebase.v1.LgtmCheck
+ (ProjectRole)(0), // 6: bytebase.v1.ProjectRole
+ (ReviewStatus)(0), // 7: bytebase.v1.ReviewStatus
+ (*GetProjectRequest)(nil), // 8: bytebase.v1.GetProjectRequest
+ (*ListProjectsRequest)(nil), // 9: bytebase.v1.ListProjectsRequest
+ (*ListProjectsResponse)(nil), // 10: bytebase.v1.ListProjectsResponse
+ (*CreateProjectRequest)(nil), // 11: bytebase.v1.CreateProjectRequest
+ (*UpdateProjectRequest)(nil), // 12: bytebase.v1.UpdateProjectRequest
+ (*DeleteProjectRequest)(nil), // 13: bytebase.v1.DeleteProjectRequest
+ (*UndeleteProjectRequest)(nil), // 14: bytebase.v1.UndeleteProjectRequest
+ (*GetIamPolicyRequest)(nil), // 15: bytebase.v1.GetIamPolicyRequest
+ (*SetIamPolicyRequest)(nil), // 16: bytebase.v1.SetIamPolicyRequest
+ (*SyncExternalIamPolicyRequest)(nil), // 17: bytebase.v1.SyncExternalIamPolicyRequest
+ (*Project)(nil), // 18: bytebase.v1.Project
+ (*IamPolicy)(nil), // 19: bytebase.v1.IamPolicy
+ (*Binding)(nil), // 20: bytebase.v1.Binding
+ (*GetReviewRequest)(nil), // 21: bytebase.v1.GetReviewRequest
+ (*ListReviewsRequest)(nil), // 22: bytebase.v1.ListReviewsRequest
+ (*ListReviewsResponse)(nil), // 23: bytebase.v1.ListReviewsResponse
+ (*UpdateReviewRequest)(nil), // 24: bytebase.v1.UpdateReviewRequest
+ (*BatchUpdateReviewsRequest)(nil), // 25: bytebase.v1.BatchUpdateReviewsRequest
+ (*BatchUpdateReviewsResponse)(nil), // 26: bytebase.v1.BatchUpdateReviewsResponse
+ (*Review)(nil), // 27: bytebase.v1.Review
+ (*fieldmaskpb.FieldMask)(nil), // 28: google.protobuf.FieldMask
+ (State)(0), // 29: bytebase.v1.State
+ (*timestamppb.Timestamp)(nil), // 30: google.protobuf.Timestamp
+ (*emptypb.Empty)(nil), // 31: google.protobuf.Empty
}
var file_v1_project_service_proto_depIdxs = []int32{
- 19, // 0: bytebase.v1.ListProjectsResponse.projects:type_name -> bytebase.v1.Project
- 19, // 1: bytebase.v1.CreateProjectRequest.project:type_name -> bytebase.v1.Project
- 19, // 2: bytebase.v1.UpdateProjectRequest.project:type_name -> bytebase.v1.Project
- 29, // 3: bytebase.v1.UpdateProjectRequest.update_mask:type_name -> google.protobuf.FieldMask
- 20, // 4: bytebase.v1.SetIamPolicyRequest.policy:type_name -> bytebase.v1.IamPolicy
- 30, // 5: bytebase.v1.Project.state:type_name -> bytebase.v1.State
+ 18, // 0: bytebase.v1.ListProjectsResponse.projects:type_name -> bytebase.v1.Project
+ 18, // 1: bytebase.v1.CreateProjectRequest.project:type_name -> bytebase.v1.Project
+ 18, // 2: bytebase.v1.UpdateProjectRequest.project:type_name -> bytebase.v1.Project
+ 28, // 3: bytebase.v1.UpdateProjectRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 19, // 4: bytebase.v1.SetIamPolicyRequest.policy:type_name -> bytebase.v1.IamPolicy
+ 29, // 5: bytebase.v1.Project.state:type_name -> bytebase.v1.State
0, // 6: bytebase.v1.Project.workflow:type_name -> bytebase.v1.Workflow
1, // 7: bytebase.v1.Project.visibility:type_name -> bytebase.v1.Visibility
2, // 8: bytebase.v1.Project.tenant_mode:type_name -> bytebase.v1.TenantMode
- 3, // 9: bytebase.v1.Project.role_provider:type_name -> bytebase.v1.RoleProvider
- 4, // 10: bytebase.v1.Project.schema_version:type_name -> bytebase.v1.SchemaVersion
- 5, // 11: bytebase.v1.Project.schema_change:type_name -> bytebase.v1.SchemaChange
- 6, // 12: bytebase.v1.Project.lgtm_check:type_name -> bytebase.v1.LgtmCheck
- 21, // 13: bytebase.v1.IamPolicy.bindings:type_name -> bytebase.v1.Binding
- 7, // 14: bytebase.v1.Binding.role:type_name -> bytebase.v1.ProjectRole
- 28, // 15: bytebase.v1.ListReviewsResponse.reviews:type_name -> bytebase.v1.Review
- 28, // 16: bytebase.v1.UpdateReviewRequest.review:type_name -> bytebase.v1.Review
- 29, // 17: bytebase.v1.UpdateReviewRequest.update_mask:type_name -> google.protobuf.FieldMask
- 25, // 18: bytebase.v1.BatchUpdateReviewsRequest.requests:type_name -> bytebase.v1.UpdateReviewRequest
- 28, // 19: bytebase.v1.BatchUpdateReviewsResponse.reviews:type_name -> bytebase.v1.Review
- 8, // 20: bytebase.v1.Review.status:type_name -> bytebase.v1.ReviewStatus
- 31, // 21: bytebase.v1.Review.create_time:type_name -> google.protobuf.Timestamp
- 31, // 22: bytebase.v1.Review.update_time:type_name -> google.protobuf.Timestamp
- 9, // 23: bytebase.v1.ProjectService.GetProject:input_type -> bytebase.v1.GetProjectRequest
- 10, // 24: bytebase.v1.ProjectService.ListProjects:input_type -> bytebase.v1.ListProjectsRequest
- 12, // 25: bytebase.v1.ProjectService.CreateProject:input_type -> bytebase.v1.CreateProjectRequest
- 13, // 26: bytebase.v1.ProjectService.UpdateProject:input_type -> bytebase.v1.UpdateProjectRequest
- 14, // 27: bytebase.v1.ProjectService.DeleteProject:input_type -> bytebase.v1.DeleteProjectRequest
- 15, // 28: bytebase.v1.ProjectService.UndeleteProject:input_type -> bytebase.v1.UndeleteProjectRequest
- 16, // 29: bytebase.v1.ProjectService.GetIamPolicy:input_type -> bytebase.v1.GetIamPolicyRequest
- 17, // 30: bytebase.v1.ProjectService.SetIamPolicy:input_type -> bytebase.v1.SetIamPolicyRequest
- 18, // 31: bytebase.v1.ProjectService.SyncExternalIamPolicy:input_type -> bytebase.v1.SyncExternalIamPolicyRequest
- 22, // 32: bytebase.v1.ProjectService.GetReview:input_type -> bytebase.v1.GetReviewRequest
- 23, // 33: bytebase.v1.ProjectService.ListReviews:input_type -> bytebase.v1.ListReviewsRequest
- 25, // 34: bytebase.v1.ProjectService.UpdateReview:input_type -> bytebase.v1.UpdateReviewRequest
- 26, // 35: bytebase.v1.ProjectService.BatchUpdateReviews:input_type -> bytebase.v1.BatchUpdateReviewsRequest
- 19, // 36: bytebase.v1.ProjectService.GetProject:output_type -> bytebase.v1.Project
- 11, // 37: bytebase.v1.ProjectService.ListProjects:output_type -> bytebase.v1.ListProjectsResponse
- 19, // 38: bytebase.v1.ProjectService.CreateProject:output_type -> bytebase.v1.Project
- 19, // 39: bytebase.v1.ProjectService.UpdateProject:output_type -> bytebase.v1.Project
- 32, // 40: bytebase.v1.ProjectService.DeleteProject:output_type -> google.protobuf.Empty
- 19, // 41: bytebase.v1.ProjectService.UndeleteProject:output_type -> bytebase.v1.Project
- 20, // 42: bytebase.v1.ProjectService.GetIamPolicy:output_type -> bytebase.v1.IamPolicy
- 20, // 43: bytebase.v1.ProjectService.SetIamPolicy:output_type -> bytebase.v1.IamPolicy
- 20, // 44: bytebase.v1.ProjectService.SyncExternalIamPolicy:output_type -> bytebase.v1.IamPolicy
- 28, // 45: bytebase.v1.ProjectService.GetReview:output_type -> bytebase.v1.Review
- 24, // 46: bytebase.v1.ProjectService.ListReviews:output_type -> bytebase.v1.ListReviewsResponse
- 28, // 47: bytebase.v1.ProjectService.UpdateReview:output_type -> bytebase.v1.Review
- 27, // 48: bytebase.v1.ProjectService.BatchUpdateReviews:output_type -> bytebase.v1.BatchUpdateReviewsResponse
- 36, // [36:49] is the sub-list for method output_type
- 23, // [23:36] is the sub-list for method input_type
- 23, // [23:23] is the sub-list for extension type_name
- 23, // [23:23] is the sub-list for extension extendee
- 0, // [0:23] is the sub-list for field type_name
+ 3, // 9: bytebase.v1.Project.schema_version:type_name -> bytebase.v1.SchemaVersion
+ 4, // 10: bytebase.v1.Project.schema_change:type_name -> bytebase.v1.SchemaChange
+ 5, // 11: bytebase.v1.Project.lgtm_check:type_name -> bytebase.v1.LgtmCheck
+ 20, // 12: bytebase.v1.IamPolicy.bindings:type_name -> bytebase.v1.Binding
+ 6, // 13: bytebase.v1.Binding.role:type_name -> bytebase.v1.ProjectRole
+ 27, // 14: bytebase.v1.ListReviewsResponse.reviews:type_name -> bytebase.v1.Review
+ 27, // 15: bytebase.v1.UpdateReviewRequest.review:type_name -> bytebase.v1.Review
+ 28, // 16: bytebase.v1.UpdateReviewRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 24, // 17: bytebase.v1.BatchUpdateReviewsRequest.requests:type_name -> bytebase.v1.UpdateReviewRequest
+ 27, // 18: bytebase.v1.BatchUpdateReviewsResponse.reviews:type_name -> bytebase.v1.Review
+ 7, // 19: bytebase.v1.Review.status:type_name -> bytebase.v1.ReviewStatus
+ 30, // 20: bytebase.v1.Review.create_time:type_name -> google.protobuf.Timestamp
+ 30, // 21: bytebase.v1.Review.update_time:type_name -> google.protobuf.Timestamp
+ 8, // 22: bytebase.v1.ProjectService.GetProject:input_type -> bytebase.v1.GetProjectRequest
+ 9, // 23: bytebase.v1.ProjectService.ListProjects:input_type -> bytebase.v1.ListProjectsRequest
+ 11, // 24: bytebase.v1.ProjectService.CreateProject:input_type -> bytebase.v1.CreateProjectRequest
+ 12, // 25: bytebase.v1.ProjectService.UpdateProject:input_type -> bytebase.v1.UpdateProjectRequest
+ 13, // 26: bytebase.v1.ProjectService.DeleteProject:input_type -> bytebase.v1.DeleteProjectRequest
+ 14, // 27: bytebase.v1.ProjectService.UndeleteProject:input_type -> bytebase.v1.UndeleteProjectRequest
+ 15, // 28: bytebase.v1.ProjectService.GetIamPolicy:input_type -> bytebase.v1.GetIamPolicyRequest
+ 16, // 29: bytebase.v1.ProjectService.SetIamPolicy:input_type -> bytebase.v1.SetIamPolicyRequest
+ 17, // 30: bytebase.v1.ProjectService.SyncExternalIamPolicy:input_type -> bytebase.v1.SyncExternalIamPolicyRequest
+ 21, // 31: bytebase.v1.ProjectService.GetReview:input_type -> bytebase.v1.GetReviewRequest
+ 22, // 32: bytebase.v1.ProjectService.ListReviews:input_type -> bytebase.v1.ListReviewsRequest
+ 24, // 33: bytebase.v1.ProjectService.UpdateReview:input_type -> bytebase.v1.UpdateReviewRequest
+ 25, // 34: bytebase.v1.ProjectService.BatchUpdateReviews:input_type -> bytebase.v1.BatchUpdateReviewsRequest
+ 18, // 35: bytebase.v1.ProjectService.GetProject:output_type -> bytebase.v1.Project
+ 10, // 36: bytebase.v1.ProjectService.ListProjects:output_type -> bytebase.v1.ListProjectsResponse
+ 18, // 37: bytebase.v1.ProjectService.CreateProject:output_type -> bytebase.v1.Project
+ 18, // 38: bytebase.v1.ProjectService.UpdateProject:output_type -> bytebase.v1.Project
+ 31, // 39: bytebase.v1.ProjectService.DeleteProject:output_type -> google.protobuf.Empty
+ 18, // 40: bytebase.v1.ProjectService.UndeleteProject:output_type -> bytebase.v1.Project
+ 19, // 41: bytebase.v1.ProjectService.GetIamPolicy:output_type -> bytebase.v1.IamPolicy
+ 19, // 42: bytebase.v1.ProjectService.SetIamPolicy:output_type -> bytebase.v1.IamPolicy
+ 19, // 43: bytebase.v1.ProjectService.SyncExternalIamPolicy:output_type -> bytebase.v1.IamPolicy
+ 27, // 44: bytebase.v1.ProjectService.GetReview:output_type -> bytebase.v1.Review
+ 23, // 45: bytebase.v1.ProjectService.ListReviews:output_type -> bytebase.v1.ListReviewsResponse
+ 27, // 46: bytebase.v1.ProjectService.UpdateReview:output_type -> bytebase.v1.Review
+ 26, // 47: bytebase.v1.ProjectService.BatchUpdateReviews:output_type -> bytebase.v1.BatchUpdateReviewsResponse
+ 35, // [35:48] is the sub-list for method output_type
+ 22, // [22:35] is the sub-list for method input_type
+ 22, // [22:22] is the sub-list for extension type_name
+ 22, // [22:22] is the sub-list for extension extendee
+ 0, // [0:22] is the sub-list for field type_name
}
func init() { file_v1_project_service_proto_init() }
@@ -2471,7 +2399,7 @@ func file_v1_project_service_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_v1_project_service_proto_rawDesc,
- NumEnums: 9,
+ NumEnums: 8,
NumMessages: 20,
NumExtensions: 0,
NumServices: 1,
diff --git a/proto/v1/project_service.proto b/proto/v1/project_service.proto
index a408beac41..cf7952116a 100644
--- a/proto/v1/project_service.proto
+++ b/proto/v1/project_service.proto
@@ -220,13 +220,11 @@ message Project {
string db_name_template = 9;
- RoleProvider role_provider = 10;
+ SchemaVersion schema_version = 10;
- SchemaVersion schema_version = 11;
+ SchemaChange schema_change = 11;
- SchemaChange schema_change = 12;
-
- LgtmCheck lgtm_check = 13;
+ LgtmCheck lgtm_check = 12;
}
message IamPolicy {
@@ -266,13 +264,6 @@ enum TenantMode {
TENANT_MODE_ENABLED = 2;
}
-enum RoleProvider {
- ROLE_PROVIDER_UNSPECIFIED = 0;
- BYTEBASE = 1;
- GITLAB_SELF_HOST = 2;
- GITHUB_COM = 3;
-}
-
enum SchemaVersion {
SCHEMA_VERSION_UNSPECIFIED = 0;
TIMESTAMP = 1;
diff --git a/server/acl_casbin_policy_dba.csv b/server/acl_casbin_policy_dba.csv
index 3b464c1e3d..de10c4fa21 100644
--- a/server/acl_casbin_policy_dba.csv
+++ b/server/acl_casbin_policy_dba.csv
@@ -13,7 +13,6 @@ p, DBA, /project/{projectID}/repository, DELETE
p, DBA, /project/{projectID}/repository/{repositoryID}/sql-review-ci, POST
p, DBA, /project/{projectID}/deployment, GET
p, DBA, /project/{projectID}/deployment, PATCH
-p, DBA, /project/{projectID}/sync-member, POST
p, DBA, /project/{projectID}/sync-sheet, POST
p, DBA, /project/{projectID}/member, POST
p, DBA, /project/{projectID}/member/{memberID}, PATCH
diff --git a/server/acl_casbin_policy_developer.csv b/server/acl_casbin_policy_developer.csv
index b2e3574770..baf522931c 100644
--- a/server/acl_casbin_policy_developer.csv
+++ b/server/acl_casbin_policy_developer.csv
@@ -13,7 +13,6 @@ p, DEVELOPER, /project/{projectID}/repository, DELETE
p, DEVELOPER, /project/{projectID}/repository/{repositoryID}/sql-review-ci, POST
p, DEVELOPER, /project/{projectID}/deployment, GET
p, DEVELOPER, /project/{projectID}/deployment, PATCH
-p, DEVELOPER, /project/{projectID}/sync-member, POST
p, DEVELOPER, /project/{projectID}/sync-sheet, POST
p, DEVELOPER, /project/{projectID}/member, POST
p, DEVELOPER, /project/{projectID}/member/{memberID}, PATCH
diff --git a/server/acl_casbin_policy_owner.csv b/server/acl_casbin_policy_owner.csv
index 3f469ee3ea..6a846fb675 100644
--- a/server/acl_casbin_policy_owner.csv
+++ b/server/acl_casbin_policy_owner.csv
@@ -16,7 +16,6 @@ p, OWNER, /project/{projectID}/repository, DELETE
p, OWNER, /project/{projectID}/repository/{repositoryID}/sql-review-ci, POST
p, OWNER, /project/{projectID}/deployment, GET
p, OWNER, /project/{projectID}/deployment, PATCH
-p, OWNER, /project/{projectID}/sync-member, POST
p, OWNER, /project/{projectID}/sync-sheet, POST
p, OWNER, /project/{projectID}/member, POST
p, OWNER, /project/{projectID}/member/{memberID}, PATCH
diff --git a/server/api/v1/project_service.go b/server/api/v1/project_service.go
index 5e737420fd..d79487d53d 100644
--- a/server/api/v1/project_service.go
+++ b/server/api/v1/project_service.go
@@ -127,12 +127,6 @@ func (s *ProjectService) UpdateProject(ctx context.Context, request *v1pb.Update
patch.TenantMode = &tenantMode
case "project.db_name_template":
patch.DBNameTemplate = &request.Project.DbNameTemplate
- case "project.role_provider":
- roleProvider, err := convertToProjectRoleProvider(request.Project.RoleProvider)
- if err != nil {
- return nil, status.Errorf(codes.InvalidArgument, err.Error())
- }
- patch.RoleProvider = &roleProvider
case "project.schema_change":
schemaChange, err := convertToProjectSchemaChangeType(request.Project.SchemaChange)
if err != nil {
@@ -258,10 +252,6 @@ func (s *ProjectService) SetIamPolicy(ctx context.Context, request *v1pb.SetIamP
if project.Deleted {
return nil, status.Errorf(codes.InvalidArgument, "project %q has been deleted", request.Project)
}
- // We only allow set IAM policy for the project whose role provider is BYTEBASE.
- if project.RoleProvider != api.ProjectRoleProviderBytebase {
- return nil, status.Errorf(codes.InvalidArgument, "the member in project %q is not managed by Bytebase, you cannot set IAM policy for the project whose members were sync from GitLab/GitHub", request.Project)
- }
policy, err := s.convertToIAMPolicyMessage(ctx, request.Policy)
if err != nil {
@@ -407,16 +397,6 @@ func convertToProject(projectMessage *store.ProjectMessage) *v1pb.Project {
tenantMode = v1pb.TenantMode_TENANT_MODE_ENABLED
}
- roleProvider := v1pb.RoleProvider_ROLE_PROVIDER_UNSPECIFIED
- switch projectMessage.RoleProvider {
- case api.ProjectRoleProviderBytebase:
- roleProvider = v1pb.RoleProvider_BYTEBASE
- case api.ProjectRoleProviderGitHubCom:
- roleProvider = v1pb.RoleProvider_GITHUB_COM
- case api.ProjectRoleProviderGitLabSelfHost:
- roleProvider = v1pb.RoleProvider_GITLAB_SELF_HOST
- }
-
schemaChange := v1pb.SchemaChange_SCHEMA_CHANGE_UNSPECIFIED
switch projectMessage.SchemaChangeType {
case api.ProjectSchemaChangeTypeDDL:
@@ -444,7 +424,6 @@ func convertToProject(projectMessage *store.ProjectMessage) *v1pb.Project {
Visibility: visibility,
TenantMode: tenantMode,
DbNameTemplate: projectMessage.DBNameTemplate,
- RoleProvider: roleProvider,
// TODO(d): schema_version_type for project.
SchemaVersion: v1pb.SchemaVersion_SCHEMA_VERSION_UNSPECIFIED,
SchemaChange: schemaChange,
@@ -491,21 +470,6 @@ func convertToProjectTenantMode(tenantMode v1pb.TenantMode) (api.ProjectTenantMo
return t, nil
}
-func convertToProjectRoleProvider(roleProvider v1pb.RoleProvider) (api.ProjectRoleProvider, error) {
- var r api.ProjectRoleProvider
- switch roleProvider {
- case v1pb.RoleProvider_BYTEBASE:
- r = api.ProjectRoleProviderBytebase
- case v1pb.RoleProvider_GITHUB_COM:
- r = api.ProjectRoleProviderGitHubCom
- case v1pb.RoleProvider_GITLAB_SELF_HOST:
- r = api.ProjectRoleProviderGitLabSelfHost
- default:
- return r, errors.Errorf("invalid role provider %v", roleProvider)
- }
- return r, nil
-}
-
func convertToProjectSchemaChangeType(schemaChange v1pb.SchemaChange) (api.ProjectSchemaChangeType, error) {
var s api.ProjectSchemaChangeType
switch schemaChange {
@@ -556,11 +520,6 @@ func convertToProjectMessage(resourceID string, project *v1pb.Project) (*store.P
return nil, err
}
- roleProvider, err := convertToProjectRoleProvider(project.RoleProvider)
- if err != nil {
- return nil, err
- }
-
schemaChange, err := convertToProjectSchemaChangeType(project.SchemaChange)
if err != nil {
return nil, err
@@ -579,7 +538,6 @@ func convertToProjectMessage(resourceID string, project *v1pb.Project) (*store.P
Visibility: visibility,
TenantMode: tenantMode,
DBNameTemplate: project.DbNameTemplate,
- RoleProvider: roleProvider,
SchemaChangeType: schemaChange,
LGTMCheckSetting: lgtmCheck,
}, nil
diff --git a/server/project.go b/server/project.go
index 6846b1540d..7158ec8f62 100644
--- a/server/project.go
+++ b/server/project.go
@@ -63,7 +63,6 @@ func (s *Server) registerProjectRoutes(g *echo.Group) {
Key: projectCreate.Key,
TenantMode: projectCreate.TenantMode,
DBNameTemplate: projectCreate.DBNameTemplate,
- RoleProvider: projectCreate.RoleProvider,
SchemaChangeType: projectCreate.SchemaChangeType,
}, creatorID)
if err != nil {
diff --git a/server/project_member.go b/server/project_member.go
index 3e6d7087d4..2a7d6f36fc 100644
--- a/server/project_member.go
+++ b/server/project_member.go
@@ -1,11 +1,9 @@
package server
import (
- "encoding/json"
"fmt"
"net/http"
"strconv"
- "time"
"github.com/google/jsonapi"
"github.com/labstack/echo/v4"
@@ -14,229 +12,10 @@ import (
"github.com/bytebase/bytebase/api"
"github.com/bytebase/bytebase/common"
"github.com/bytebase/bytebase/common/log"
- vcsPlugin "github.com/bytebase/bytebase/plugin/vcs"
"github.com/bytebase/bytebase/server/component/activity"
- "github.com/bytebase/bytebase/server/utils"
- "github.com/bytebase/bytebase/store"
)
func (s *Server) registerProjectMemberRoutes(g *echo.Group) {
- // for now we only support sync project member from privately deployed GitLab
- g.POST("/project/:projectID/sync-member", func(c echo.Context) error {
- ctx := c.Request().Context()
- projectID, err := strconv.Atoi(c.Param("projectID"))
- if err != nil {
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Project ID is not a number: %s", c.Param("projectID"))).SetInternal(err)
- }
-
- project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{UID: &projectID})
- if err != nil {
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Project not found: %s", c.Param("projectID"))).SetInternal(err)
- }
- if project == nil {
- return echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("Project ID not found: %d", projectID))
- }
- if project.Workflow != api.VCSWorkflow {
- return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid workflow type: %s, need %s to enable this function", project.Workflow, api.VCSWorkflow))
- }
-
- // fetch project member from VCS
- repo, err := s.store.GetRepository(ctx, &api.RepositoryFind{ProjectID: &projectID})
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to fetch relevant VCS repo, Project ID: %s", c.Param("projectID"))).SetInternal(err)
- }
- vcs, err := s.store.GetVCSByID(ctx, repo.VCSID)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to find VCS for sync project member: %d", repo.VCSID)).SetInternal(err)
- }
- if vcs == nil {
- return echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("VCS not found with ID: %d", repo.VCSID))
- }
- vcsProjectMemberList, err := vcsPlugin.Get(vcs.Type, vcsPlugin.ProviderConfig{}).FetchRepositoryActiveMemberList(ctx,
- common.OauthContext{
- ClientID: vcs.ApplicationID,
- ClientSecret: vcs.Secret,
- AccessToken: repo.AccessToken,
- RefreshToken: repo.RefreshToken,
- Refresher: utils.RefreshToken(ctx, s.store, repo.WebURL),
- },
- vcs.InstanceURL,
- repo.ExternalID,
- )
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to fetch repository member from VCS, instance URL: %s", vcs.InstanceURL)).SetInternal(err)
- }
-
- // The following block will check whether the relevant principal exists in our system.
- // If the principal does not exist, we will try to create one out of the vcs member info.
- var createList []*api.ProjectMemberCreate
- // we declare latSyncTs to ensure that every projectMember would have the same sync time.
- lastSyncTs := time.Now().UTC().Unix()
- for _, projectMember := range vcsProjectMemberList {
- if vcs.Type != projectMember.RoleProvider {
- return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Invalid role provider, expected: %v, got: %v", vcs.Type, projectMember.RoleProvider)).SetInternal(err)
- }
-
- user, err := s.store.GetUserByEmail(ctx, projectMember.Email)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Failed to fetch principal info").SetInternal(err)
- }
- if user == nil { // try to create principal
- password, err := common.RandomString(20)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Failed to generate random password").SetInternal(err)
- }
- signUpInfo := &api.SignUp{
- Name: projectMember.Name,
- Email: projectMember.Email,
- // Principal created via this method would have no chance to set their password.
- // To prevent potential security issues, we use random string to set up her password.
- // This is another safety measure since we already disallow user login via password
- // if the principal uses external auth provider
- Password: password,
- }
- createdUser, httpErr := trySignUp(ctx, s, signUpInfo, c.Get(getPrincipalIDContextKey()).(int))
- if httpErr != nil {
- return httpErr
- }
- user = createdUser
- }
-
- providerPayload := &api.ProjectRoleProviderPayload{
- VCSRole: projectMember.VCSRole,
- LastSyncTs: lastSyncTs,
- }
- providerPayloadBytes, err := json.Marshal(providerPayload)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Failed to marshal providerPayload").SetInternal(err)
- }
- createProjectMember := &api.ProjectMemberCreate{
- ProjectID: projectID,
- CreatorID: c.Get(getPrincipalIDContextKey()).(int),
- PrincipalID: user.ID,
- Role: projectMember.Role,
- RoleProvider: api.ProjectRoleProvider(projectMember.RoleProvider),
- Payload: string(providerPayloadBytes),
- }
- createList = append(createList, createProjectMember)
- }
-
- var roleProvider api.ProjectRoleProvider
- switch vcs.Type {
- case vcsPlugin.GitLabSelfHost:
- roleProvider = api.ProjectRoleProviderGitLabSelfHost
- case vcsPlugin.GitHubCom:
- roleProvider = api.ProjectRoleProviderGitHubCom
- default:
- return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Unrecognized VCS type %q", vcs.Type))
- }
-
- batchUpdateProjectMember := &api.ProjectMemberBatchUpdate{
- ProjectID: projectID,
- UpdaterID: c.Get(getPrincipalIDContextKey()).(int),
- RoleProvider: roleProvider,
- List: createList,
- }
- createdMemberList, deletedMemberList, err := s.store.BatchUpdateProjectMember(ctx, batchUpdateProjectMember)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, "Failed to sync project member from VCS").SetInternal(err)
- }
-
- createdIDMemberMap := make(map[int]*api.ProjectMember)
- for _, createdMember := range createdMemberList {
- createdIDMemberMap[createdMember.PrincipalID] = createdMember
- }
- deletedIDMemberMap := make(map[int]*api.ProjectMember)
- for _, deletedMember := range deletedMemberList {
- deletedIDMemberMap[deletedMember.PrincipalID] = deletedMember
- }
-
- // create ROLE CREATE/ MEMBER UPDATE activity
- for id, createdMember := range createdIDMemberMap {
- // if the same member exist before, we will create a ROLE UPDATE activity
- if deletedMember, ok := deletedIDMemberMap[id]; ok {
- // do nothing if nothing changed
- if createdMember.Role == deletedMember.Role && createdMember.RoleProvider == deletedMember.RoleProvider {
- continue
- }
- user, err := s.store.GetUserByID(ctx, createdMember.PrincipalID)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Fail to create member relation, Principal ID: %v", user.ID)).SetInternal(err)
- }
- activityUpdateMember := &api.ActivityCreate{
- CreatorID: c.Get(getPrincipalIDContextKey()).(int),
- ContainerID: projectID,
- Type: api.ActivityProjectMemberRoleUpdate,
- Level: api.ActivityInfo,
- Comment: fmt.Sprintf("Changed %s (%s) from %s (provided by %s) to %s (provided by %s).",
- user.Name, user.Email, deletedMember.Role, deletedMember.RoleProvider, createdMember.Role, createdMember.RoleProvider),
- }
- if _, err := s.store.CreateActivity(ctx, activityUpdateMember); err != nil {
- log.Warn("Failed to create project activity after updating member role",
- zap.Int("project_id", projectID),
- zap.Int("principal_id", user.ID),
- zap.String("principal_name", user.Name),
- zap.String("old_role", deletedMember.Role),
- zap.String("new_role", createdMember.Role),
- zap.Error(err))
- }
- } else {
- // otherwise, we will create a MEMBER CREATE activity
- user, err := s.store.GetUserByID(ctx, createdMember.PrincipalID)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Fail to find the relevant principal of the member relation, principal ID: %v", user.ID)).SetInternal(err)
- }
- activityCreateMember := &api.ActivityCreate{
- CreatorID: c.Get(getPrincipalIDContextKey()).(int),
- ContainerID: projectID,
- Type: api.ActivityProjectMemberCreate,
- Level: api.ActivityInfo,
- Comment: fmt.Sprintf("Granted %s to %s (%s) (synced from VCS).",
- user.Name, user.Email, createdMember.Role),
- }
- if _, err := s.store.CreateActivity(ctx, activityCreateMember); err != nil {
- log.Warn("Failed to create project activity after creating member",
- zap.Int("project_id", projectID),
- zap.Int("principal_id", user.ID),
- zap.String("principal_name", user.Name),
- zap.String("role", string(createdMember.Role)),
- zap.Error(err))
- }
- }
- }
-
- // create MEMBER DELETE activity
- for id, deletedMember := range deletedIDMemberMap {
- if _, ok := createdIDMemberMap[id]; ok {
- // if the member does exist in createdMemberList, meaning we need to update this member(already done above).
- continue
- }
- user, err := s.store.GetUserByID(ctx, deletedMember.PrincipalID)
- if err != nil {
- return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Fail to create member relation, Principal ID: %v", deletedMember.PrincipalID)).SetInternal(err)
- }
- activityDeleteMember := &api.ActivityCreate{
- CreatorID: c.Get(getPrincipalIDContextKey()).(int),
- ContainerID: projectID,
- Type: api.ActivityProjectMemberDelete,
- Level: api.ActivityInfo,
- Comment: fmt.Sprintf("Revoked %s from %s (%s). Because this member does not belong to the VCS.",
- user.Name, user.Email, deletedMember.Role),
- }
- if _, err := s.store.CreateActivity(ctx, activityDeleteMember); err != nil {
- log.Warn("Failed to create project activity after creating member",
- zap.Int("project_id", projectID),
- zap.Int("principal_id", user.ID),
- zap.String("principal_name", user.Name),
- zap.String("role", deletedMember.Role),
- zap.Error(err))
- }
- }
-
- c.Response().Header().Set(echo.HeaderContentType, echo.MIMEApplicationJSONCharsetUTF8)
- return nil
- })
-
g.POST("/project/:projectID/member", func(c echo.Context) error {
ctx := c.Request().Context()
projectID, err := strconv.Atoi(c.Param("projectID"))
diff --git a/store/demo/schema-migration-history/10001##data.sql b/store/demo/schema-migration-history/10001##data.sql
index 236b25ccc5..62f56884b3 100644
--- a/store/demo/schema-migration-history/10001##data.sql
+++ b/store/demo/schema-migration-history/10001##data.sql
@@ -6,12 +6,12 @@ INSERT INTO "public"."principal" ("id", "row_status", "creator_id", "created_ts"
INSERT INTO "public"."member" ("id", "row_status", "creator_id", "created_ts", "updater_id", "updated_ts", "status", "role", "principal_id") VALUES
(101, 'NORMAL', 1, 1657272815, 1, 1657272815, 'ACTIVE', 'OWNER', 101);
-INSERT INTO "public"."project" ("id", "row_status", "creator_id", "created_ts", "updater_id", "updated_ts", "name", "key", "workflow_type", "visibility", "tenant_mode", "db_name_template", "role_provider") VALUES
-(1, 'NORMAL', 1, 1657272778, 1, 1657272778, 'Default', 'DEFAULT', 'UI', 'PUBLIC', 'DISABLED', '', 'BYTEBASE'),
-(101, 'NORMAL', 101, 1657272873, 101, 1657272873, 'DEMO', 'Z77', 'UI', 'PUBLIC', 'DISABLED', '', 'BYTEBASE');
+INSERT INTO "public"."project" ("id", "row_status", "creator_id", "created_ts", "updater_id", "updated_ts", "name", "key", "workflow_type", "visibility", "tenant_mode", "db_name_template") VALUES
+(1, 'NORMAL', 1, 1657272778, 1, 1657272778, 'Default', 'DEFAULT', 'UI', 'PUBLIC', 'DISABLED', ''),
+(101, 'NORMAL', 101, 1657272873, 101, 1657272873, 'DEMO', 'Z77', 'UI', 'PUBLIC', 'DISABLED', '');
-INSERT INTO "public"."project_member" ("id", "row_status", "creator_id", "created_ts", "updater_id", "updated_ts", "project_id", "role", "principal_id", "role_provider", "payload") VALUES
-(101, 'NORMAL', 101, 1657272873, 101, 1657272873, 101, 'OWNER', 101, 'BYTEBASE', '{}');
+INSERT INTO "public"."project_member" ("id", "row_status", "creator_id", "created_ts", "updater_id", "updated_ts", "project_id", "role", "principal_id", "payload") VALUES
+(101, 'NORMAL', 101, 1657272873, 101, 1657272873, 101, 'OWNER', 101, '{}');
INSERT INTO "public"."environment" ("id", "row_status", "creator_id", "created_ts", "updater_id", "updated_ts", "name", "order") VALUES
(101, 'NORMAL', 1, 1657272778, 1, 1657272778, 'Test', 0),
diff --git a/store/project.go b/store/project.go
index 407fd6cf85..fe73ec5485 100644
--- a/store/project.go
+++ b/store/project.go
@@ -68,10 +68,6 @@ func (s *Store) PatchProject(ctx context.Context, patch *api.ProjectPatch) (*api
v := api.ProjectWorkflowType(*patch.WorkflowType)
v2Update.Workflow = &v
}
- if patch.RoleProvider != nil {
- v := api.ProjectRoleProvider(*patch.RoleProvider)
- v2Update.RoleProvider = &v
- }
if patch.SchemaChangeType != nil {
v := api.ProjectSchemaChangeType(*patch.SchemaChangeType)
v2Update.SchemaChangeType = &v
@@ -102,7 +98,6 @@ func (s *Store) composeProject(ctx context.Context, project *ProjectMessage) (*a
Visibility: project.Visibility,
TenantMode: project.TenantMode,
DBNameTemplate: project.DBNameTemplate,
- RoleProvider: project.RoleProvider,
SchemaChangeType: project.SchemaChangeType,
LGTMCheckSetting: project.LGTMCheckSetting,
}
@@ -128,7 +123,6 @@ type ProjectMessage struct {
Visibility api.ProjectVisibility
TenantMode api.ProjectTenantMode
DBNameTemplate string
- RoleProvider api.ProjectRoleProvider
SchemaChangeType api.ProjectSchemaChangeType
LGTMCheckSetting api.LGTMCheckSetting
// The following fields are output only and not used for create().
@@ -155,7 +149,6 @@ type UpdateProjectMessage struct {
TenantMode *api.ProjectTenantMode
DBNameTemplate *string
Workflow *api.ProjectWorkflowType
- RoleProvider *api.ProjectRoleProvider
SchemaChangeType *api.ProjectSchemaChangeType
LGTMCheckSetting *api.LGTMCheckSetting
Delete *bool
@@ -237,9 +230,6 @@ func (s *Store) CreateProjectV2(ctx context.Context, create *ProjectMessage, cre
if create.Visibility == "" {
create.Visibility = api.Public
}
- if create.RoleProvider == "" {
- create.RoleProvider = api.ProjectRoleProviderBytebase
- }
if create.SchemaChangeType == "" {
create.SchemaChangeType = api.ProjectSchemaChangeTypeDDL
}
@@ -266,7 +256,6 @@ func (s *Store) CreateProjectV2(ctx context.Context, create *ProjectMessage, cre
Visibility: create.Visibility,
TenantMode: create.TenantMode,
DBNameTemplate: create.DBNameTemplate,
- RoleProvider: create.RoleProvider,
SchemaChangeType: create.SchemaChangeType,
LGTMCheckSetting: create.LGTMCheckSetting,
}
@@ -281,11 +270,10 @@ func (s *Store) CreateProjectV2(ctx context.Context, create *ProjectMessage, cre
visibility,
tenant_mode,
db_name_template,
- role_provider,
schema_change_type,
lgtm_check
)
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)
RETURNING id
`,
creatorID,
@@ -297,7 +285,6 @@ func (s *Store) CreateProjectV2(ctx context.Context, create *ProjectMessage, cre
create.Visibility,
create.TenantMode,
create.DBNameTemplate,
- create.RoleProvider,
create.SchemaChangeType,
create.LGTMCheckSetting,
).Scan(
@@ -319,7 +306,7 @@ func (s *Store) CreateProjectV2(ctx context.Context, create *ProjectMessage, cre
},
},
}
- if err := s.setProjectIAMPolicyImpl(ctx, tx, policy, project.RoleProvider, creatorID, project.UID); err != nil {
+ if err := s.setProjectIAMPolicyImpl(ctx, tx, policy, creatorID, project.UID); err != nil {
return nil, err
}
@@ -379,9 +366,6 @@ func (*Store) updateProjectImplV2(ctx context.Context, tx *Tx, patch *UpdateProj
if v := patch.Workflow; v != nil {
set, args = append(set, fmt.Sprintf("workflow_type = $%d", len(args)+1)), append(args, *v)
}
- if v := patch.RoleProvider; v != nil {
- set, args = append(set, fmt.Sprintf("role_provider = $%d", len(args)+1)), append(args, *v)
- }
if v := patch.SchemaChangeType; v != nil {
set, args = append(set, fmt.Sprintf("schema_change_type = $%d", len(args)+1)), append(args, *v)
}
@@ -405,7 +389,6 @@ func (*Store) updateProjectImplV2(ctx context.Context, tx *Tx, patch *UpdateProj
visibility,
tenant_mode,
db_name_template,
- role_provider,
schema_change_type,
lgtm_check,
row_status
@@ -420,7 +403,6 @@ func (*Store) updateProjectImplV2(ctx context.Context, tx *Tx, patch *UpdateProj
&project.Visibility,
&project.TenantMode,
&project.DBNameTemplate,
- &project.RoleProvider,
&project.SchemaChangeType,
&project.LGTMCheckSetting,
&rowStatus,
@@ -457,7 +439,6 @@ func (*Store) listProjectImplV2(ctx context.Context, tx *Tx, find *FindProjectMe
visibility,
tenant_mode,
db_name_template,
- role_provider,
schema_change_type,
lgtm_check,
row_status
@@ -482,7 +463,6 @@ func (*Store) listProjectImplV2(ctx context.Context, tx *Tx, find *FindProjectMe
&projectMessage.Visibility,
&projectMessage.TenantMode,
&projectMessage.DBNameTemplate,
- &projectMessage.RoleProvider,
&projectMessage.SchemaChangeType,
&projectMessage.LGTMCheckSetting,
&rowStatus,
diff --git a/store/project_member.go b/store/project_member.go
index 696127d008..68df6c2f7a 100644
--- a/store/project_member.go
+++ b/store/project_member.go
@@ -28,10 +28,8 @@ type projectMemberRaw struct {
ProjectID int
// Domain specific fields
- Role string
- PrincipalID int
- RoleProvider api.ProjectRoleProvider
- Payload string
+ Role string
+ PrincipalID int
}
// toProjectMember creates an instance of ProjectMember based on the projectMemberRaw.
@@ -50,10 +48,8 @@ func (raw *projectMemberRaw) toProjectMember() *api.ProjectMember {
ProjectID: raw.PrincipalID,
// Domain specific fields
- Role: raw.Role,
- PrincipalID: raw.PrincipalID,
- RoleProvider: raw.RoleProvider,
- Payload: raw.Payload,
+ Role: raw.Role,
+ PrincipalID: raw.PrincipalID,
}
}
@@ -169,32 +165,6 @@ func (s *Store) DeleteProjectMember(ctx context.Context, delete *api.ProjectMemb
return nil
}
-// BatchUpdateProjectMember update the project member with provided project member list.
-func (s *Store) BatchUpdateProjectMember(ctx context.Context, batchUpdate *api.ProjectMemberBatchUpdate) ([]*api.ProjectMember, []*api.ProjectMember, error) {
- createdMemberRawList, deletedMemberRawList, err := s.batchUpdateProjectMemberRaw(ctx, batchUpdate)
- if err != nil {
- return nil, nil, errors.Wrapf(err, "failed to batch update projectMemberRaw with ProjectMemberBatchUpdate[%+v]", batchUpdate)
- }
- var createdMemberList, deletedMemberList []*api.ProjectMember
- for _, raw := range createdMemberRawList {
- createdMember, err := s.composeProjectMember(ctx, raw)
- if err != nil {
- return nil, nil, errors.Wrapf(err, "failed to compose created ProjectMember with projectMemberRaw[%+v]", raw)
- }
- createdMemberList = append(createdMemberList, createdMember)
- }
- for _, raw := range deletedMemberRawList {
- deletedMember, err := s.composeProjectMember(ctx, raw)
- if err != nil {
- return nil, nil, errors.Wrapf(err, "failed to compose deleted ProjectMember with projectMemberRaw[%+v]", raw)
- }
- deletedMemberList = append(deletedMemberList, deletedMember)
- }
- // Invalidate the cache.
- s.cache.DeleteCache(projectMemberCacheNamespace, batchUpdate.ProjectID)
- return createdMemberList, deletedMemberList, nil
-}
-
//
// private functions
//
@@ -302,145 +272,19 @@ func (s *Store) patchProjectMemberRaw(ctx context.Context, patch *api.ProjectMem
return projectMember, nil
}
-// getBatchUpdatePrincipalIDList return the principal ID for each operation (this function may be a litter overhead, but it is easy to be tested).
-func getBatchUpdatePrincipalIDList(oldPrincipalIDList []int, newPrincipalIDList []int) (createPrincipalIDList, patchPrincipalIDList, deletePrincipalIDList []int) {
- oldPrincipalIDSet := make(map[int]bool)
- for _, id := range oldPrincipalIDList {
- oldPrincipalIDSet[id] = true
- }
-
- newPrincipalIDSet := make(map[int]bool)
- for _, id := range newPrincipalIDList {
- newPrincipalIDSet[id] = true
- }
-
- for _, newID := range newPrincipalIDList {
- // if the ID exists, we will try to update it (NOTICE: a member with the same principal ID but different role provider will be considered as separate member)
- if _, ok := oldPrincipalIDSet[newID]; ok {
- patchPrincipalIDList = append(patchPrincipalIDList, newID)
- } else {
- createPrincipalIDList = append(createPrincipalIDList, newID)
- }
- }
-
- for _, oldID := range oldPrincipalIDList {
- // if the old ID also exists on the new id list, then it has already been added to the patch list above.
- if _, ok := newPrincipalIDSet[oldID]; ok {
- continue
- }
- deletePrincipalIDList = append(deletePrincipalIDList, oldID)
- }
-
- return createPrincipalIDList, patchPrincipalIDList, deletePrincipalIDList
-}
-
-// batchUpdateProjectMemberRaw update the project member with provided project member list.
-func (s *Store) batchUpdateProjectMemberRaw(ctx context.Context, batchUpdate *api.ProjectMemberBatchUpdate) ([]*projectMemberRaw, []*projectMemberRaw, error) {
- var createdMemberRawList []*projectMemberRaw
- var deletedMemberRawList []*projectMemberRaw
- tx, err := s.db.BeginTx(ctx, nil)
- if err != nil {
- return nil, nil, FormatError(err)
- }
- defer tx.Rollback()
-
- txRead, err := s.db.BeginTx(ctx, nil)
- if err != nil {
- return nil, nil, FormatError(err)
- }
- defer txRead.Rollback()
-
- findProjectMember := &api.ProjectMemberFind{
- ProjectID: &batchUpdate.ProjectID,
- RoleProvider: &batchUpdate.RoleProvider,
- }
- oldProjectMemberRawList, err := findProjectMemberImpl(ctx, txRead, findProjectMember)
- if err != nil {
- return nil, nil, err
- }
-
- oldMemberRawMap := make(map[int]*projectMemberRaw)
- var oldPrincipalIDList []int
- for _, oldMemberRaw := range oldProjectMemberRawList {
- oldMemberRawMap[oldMemberRaw.PrincipalID] = oldMemberRaw
- oldPrincipalIDList = append(oldPrincipalIDList, oldMemberRaw.PrincipalID)
- }
- memberCreateMap := make(map[int]*api.ProjectMemberCreate)
- var newPrincipalIDList []int
- for _, newMember := range batchUpdate.List {
- memberCreateMap[newMember.PrincipalID] = newMember
- newPrincipalIDList = append(newPrincipalIDList, newMember.PrincipalID)
- }
-
- createPrincipalIDList, patchPrincipalIDList, deletePrincipalIDList := getBatchUpdatePrincipalIDList(oldPrincipalIDList, newPrincipalIDList)
-
- for _, id := range createPrincipalIDList {
- memberCreate := memberCreateMap[id]
- createdMember, err := createProjectMemberImpl(ctx, tx, memberCreate)
- if err != nil {
- return nil, nil, FormatError(err)
- }
- createdMemberRawList = append(createdMemberRawList, createdMember)
- }
-
- for _, id := range patchPrincipalIDList {
- oldMemberRaw := oldMemberRawMap[id]
- newMemberCreate := memberCreateMap[id]
- memberPatch := &api.ProjectMemberPatch{
- ID: oldMemberRaw.ID,
- UpdaterID: batchUpdate.UpdaterID,
- Role: (*string)(&newMemberCreate.Role),
- RoleProvider: (*string)(&newMemberCreate.RoleProvider),
- Payload: &newMemberCreate.Payload,
- }
- patchedMemberRaw, err := patchProjectMemberImpl(ctx, tx, memberPatch)
- if err != nil {
- return nil, nil, FormatError(err)
- }
- createdMemberRawList = append(createdMemberRawList, patchedMemberRaw)
- deletedMemberRawList = append(deletedMemberRawList, oldMemberRaw)
- }
-
- for _, id := range deletePrincipalIDList {
- deletedMember := oldMemberRawMap[id]
- memberDelete := &api.ProjectMemberDelete{
- ID: deletedMember.ID,
- DeleterID: batchUpdate.UpdaterID,
- }
- if err := s.deleteProjectMemberImpl(ctx, tx, memberDelete); err != nil {
- return nil, nil, FormatError(err)
- }
- deletedMemberRawList = append(deletedMemberRawList, deletedMember)
- }
-
- if err := tx.Commit(); err != nil {
- return nil, nil, FormatError(err)
- }
-
- return createdMemberRawList, deletedMemberRawList, nil
-}
-
// createProjectMemberImpl creates a new projectMember.
func createProjectMemberImpl(ctx context.Context, tx *Tx, create *api.ProjectMemberCreate) (*projectMemberRaw, error) {
// Insert row into database.
- if create.Payload == "" {
- create.Payload = "{}"
- }
- if create.RoleProvider == "" {
- create.RoleProvider = api.ProjectRoleProviderBytebase
- }
query := `
INSERT INTO project_member (
creator_id,
updater_id,
project_id,
role,
- principal_id,
- role_provider,
- payload
+ principal_id
)
- VALUES ($1, $2, $3, $4, $5, $6, $7)
- RETURNING id, creator_id, created_ts, updater_id, updated_ts, project_id, role, principal_id, role_provider, payload
+ VALUES ($1, $2, $3, $4, $5)
+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, project_id, role, principal_id
`
var projectMemberRaw projectMemberRaw
if err := tx.QueryRowContext(ctx, query,
@@ -449,8 +293,6 @@ func createProjectMemberImpl(ctx context.Context, tx *Tx, create *api.ProjectMem
create.ProjectID,
create.Role,
create.PrincipalID,
- create.RoleProvider,
- create.Payload,
).Scan(
&projectMemberRaw.ID,
&projectMemberRaw.CreatorID,
@@ -460,8 +302,6 @@ func createProjectMemberImpl(ctx context.Context, tx *Tx, create *api.ProjectMem
&projectMemberRaw.ProjectID,
&projectMemberRaw.Role,
&projectMemberRaw.PrincipalID,
- &projectMemberRaw.RoleProvider,
- &projectMemberRaw.Payload,
); err != nil {
if err == sql.ErrNoRows {
return nil, common.FormatDBErrorEmptyRowWithQuery(query)
@@ -486,9 +326,6 @@ func findProjectMemberImpl(ctx context.Context, tx *Tx, find *api.ProjectMemberF
if v := find.Role; v != nil {
where, args = append(where, fmt.Sprintf("role = $%d", len(args)+1)), append(args, *v)
}
- if v := find.RoleProvider; v != nil {
- where, args = append(where, fmt.Sprintf("role_provider = $%d", len(args)+1)), append(args, *v)
- }
rows, err := tx.QueryContext(ctx, `
SELECT
@@ -499,9 +336,7 @@ func findProjectMemberImpl(ctx context.Context, tx *Tx, find *api.ProjectMemberF
updated_ts,
project_id,
role,
- principal_id,
- role_provider,
- payload
+ principal_id
FROM project_member
WHERE `+strings.Join(where, " AND "),
args...,
@@ -524,8 +359,6 @@ func findProjectMemberImpl(ctx context.Context, tx *Tx, find *api.ProjectMemberF
&projectMemberRaw.ProjectID,
&projectMemberRaw.Role,
&projectMemberRaw.PrincipalID,
- &projectMemberRaw.RoleProvider,
- &projectMemberRaw.Payload,
); err != nil {
return nil, FormatError(err)
}
@@ -546,17 +379,6 @@ func patchProjectMemberImpl(ctx context.Context, tx *Tx, patch *api.ProjectMembe
if v := patch.Role; v != nil {
set, args = append(set, fmt.Sprintf("role = $%d", len(args)+1)), append(args, *v)
}
- if v := patch.RoleProvider; v != nil {
- set, args = append(set, fmt.Sprintf("role_provider = $%d", len(args)+1)), append(args, *v)
- }
- if v := patch.Payload; v != nil {
- payload := "{}"
- if *v == "" {
- payload = *v
- }
- set, args = append(set, fmt.Sprintf("payload = $%d", len(args)+1)), append(args, payload)
- }
-
args = append(args, patch.ID)
var projectMemberRaw projectMemberRaw
@@ -565,7 +387,7 @@ func patchProjectMemberImpl(ctx context.Context, tx *Tx, patch *api.ProjectMembe
UPDATE project_member
SET `+strings.Join(set, ", ")+`
WHERE id = $%d
- RETURNING id, creator_id, created_ts, updater_id, updated_ts, project_id, role, principal_id, role_provider, payload
+ RETURNING id, creator_id, created_ts, updater_id, updated_ts, project_id, role, principal_id
`, len(args)),
args...,
).Scan(
@@ -577,8 +399,6 @@ func patchProjectMemberImpl(ctx context.Context, tx *Tx, patch *api.ProjectMembe
&projectMemberRaw.ProjectID,
&projectMemberRaw.Role,
&projectMemberRaw.PrincipalID,
- &projectMemberRaw.RoleProvider,
- &projectMemberRaw.Payload,
); err != nil {
if err == sql.ErrNoRows {
return nil, &common.Error{Code: common.NotFound, Err: errors.Errorf("project member ID not found: %d", patch.ID)}
@@ -640,7 +460,7 @@ func (s *Store) GetProjectPolicy(ctx context.Context, find *GetProjectPolicyMess
}
defer tx.Rollback()
- projectPolicy, err := s.getProjectPolicyImpl(ctx, tx, project.RoleProvider, find)
+ projectPolicy, err := s.getProjectPolicyImpl(ctx, tx, find)
if err != nil {
return nil, err
}
@@ -664,17 +484,16 @@ func (s *Store) SetProjectIAMPolicy(ctx context.Context, set *IAMPolicyMessage,
}
defer tx.Rollback()
- if err := s.setProjectIAMPolicyImpl(ctx, tx, set, api.ProjectRoleProviderBytebase, creatorUID, projectUID); err != nil {
+ if err := s.setProjectIAMPolicyImpl(ctx, tx, set, creatorUID, projectUID); err != nil {
return err
}
return tx.Commit()
}
-func (s *Store) getProjectPolicyImpl(ctx context.Context, tx *Tx, projectRoleProvider api.ProjectRoleProvider, find *GetProjectPolicyMessage) (*IAMPolicyMessage, error) {
+func (s *Store) getProjectPolicyImpl(ctx context.Context, tx *Tx, find *GetProjectPolicyMessage) (*IAMPolicyMessage, error) {
where, args := []string{"TRUE"}, []interface{}{}
where, args = append(where, fmt.Sprintf("project_member.row_status = $%d", len(args)+1)), append(args, api.Normal)
- where, args = append(where, fmt.Sprintf("project_member.role_provider = $%d", len(args)+1)), append(args, projectRoleProvider)
if v := find.ProjectID; v != nil {
where, args = append(where, fmt.Sprintf("project.resource_id = $%d", len(args)+1)), append(args, *v)
}
@@ -730,11 +549,11 @@ func (s *Store) getProjectPolicyImpl(ctx context.Context, tx *Tx, projectRolePro
return projectPolicy, nil
}
-func (s *Store) setProjectIAMPolicyImpl(ctx context.Context, tx *Tx, set *IAMPolicyMessage, projectRoleProvider api.ProjectRoleProvider, creatorUID int, projectUID int) error {
+func (s *Store) setProjectIAMPolicyImpl(ctx context.Context, tx *Tx, set *IAMPolicyMessage, creatorUID int, projectUID int) error {
if set == nil {
return errors.Errorf("SetProjectPolicy must set IAMPolicyMessage")
}
- oldPolicy, err := s.getProjectPolicyImpl(ctx, tx, projectRoleProvider, &GetProjectPolicyMessage{
+ oldPolicy, err := s.getProjectPolicyImpl(ctx, tx, &GetProjectPolicyMessage{
UID: &projectUID,
})
if err != nil {
@@ -753,14 +572,13 @@ func (s *Store) setProjectIAMPolicyImpl(ctx context.Context, tx *Tx, set *IAMPol
var placeholders []string
for _, binding := range inserts.Bindings {
for _, member := range binding.Members {
- placeholders = append(placeholders, fmt.Sprintf("($%d, $%d, $%d, $%d, $%d, $%d)", len(args)+1, len(args)+2, len(args)+3, len(args)+4, len(args)+5, len(args)+6))
+ placeholders = append(placeholders, fmt.Sprintf("($%d, $%d, $%d, $%d, $%d)", len(args)+1, len(args)+2, len(args)+3, len(args)+4, len(args)+5))
args = append(args,
- creatorUID, // creator_id
- creatorUID, // updater_id
- projectUID, // project_id
- binding.Role, // role
- member.ID, // principal_id
- projectRoleProvider, // role_provider
+ creatorUID, // creator_id
+ creatorUID, // updater_id
+ projectUID, // project_id
+ binding.Role, // role
+ member.ID, // principal_id
)
}
}
@@ -769,8 +587,7 @@ func (s *Store) setProjectIAMPolicyImpl(ctx context.Context, tx *Tx, set *IAMPol
updater_id,
project_id,
role,
- principal_id,
- role_provider
+ principal_id
) VALUES %s`, strings.Join(placeholders, ", "))
if _, err := tx.ExecContext(ctx, query, args...); err != nil {
return FormatError(err)
diff --git a/store/project_member_test.go b/store/project_member_test.go
index 011e193d49..5f6933e025 100644
--- a/store/project_member_test.go
+++ b/store/project_member_test.go
@@ -9,111 +9,6 @@ import (
"github.com/bytebase/bytebase/api"
)
-func TestGetBatchUpdatePrincipalIDList(t *testing.T) {
- type Input struct {
- oldIDList []int
- newIDList []int
- }
- type Result struct {
- createIDList []int
- patchIDList []int
- deleteIDList []int
- }
-
- testCases := map[string]struct {
- input Input
- expect Result
- }{
- "single_patch": {
- input: Input{
- oldIDList: []int{1, 2, 3},
- newIDList: []int{1, 2, 3},
- },
- expect: Result{
- createIDList: nil,
- patchIDList: []int{1, 2, 3},
- deleteIDList: nil,
- },
- },
- "single_delete": {
- input: Input{
- oldIDList: []int{1, 2, 3},
- newIDList: nil,
- },
- expect: Result{
- createIDList: nil,
- patchIDList: nil,
- deleteIDList: []int{1, 2, 3},
- },
- },
- "single_create": {
- input: Input{
- oldIDList: nil,
- newIDList: []int{1, 2, 3},
- },
- expect: Result{
- createIDList: []int{1, 2, 3},
- patchIDList: nil,
- deleteIDList: nil,
- },
- },
- "create_delete": {
- input: Input{
- oldIDList: []int{1, 2},
- newIDList: []int{3, 4},
- },
- expect: Result{
- createIDList: []int{3, 4},
- patchIDList: nil,
- deleteIDList: []int{1, 2},
- },
- },
- "create_patch": {
- input: Input{
- oldIDList: []int{1, 2},
- newIDList: []int{1, 2, 3},
- },
- expect: Result{
- createIDList: []int{3},
- patchIDList: []int{1, 2},
- deleteIDList: nil,
- },
- },
- "delete_patch": {
- input: Input{
- oldIDList: []int{1, 2},
- newIDList: []int{2},
- },
- expect: Result{
- createIDList: nil,
- patchIDList: []int{2},
- deleteIDList: []int{1},
- },
- },
- "mixed": {
- input: Input{
- oldIDList: []int{1, 2},
- newIDList: []int{2, 3},
- },
- expect: Result{
- createIDList: []int{3},
- patchIDList: []int{2},
- deleteIDList: []int{1},
- },
- },
- }
-
- for name, tc := range testCases {
- t.Run(name, func(t *testing.T) {
- var got Result
- got.createIDList, got.patchIDList, got.deleteIDList = getBatchUpdatePrincipalIDList(tc.input.oldIDList, tc.input.newIDList)
- require.Equal(t, tc.expect.createIDList, got.createIDList)
- require.Equal(t, tc.expect.patchIDList, got.patchIDList)
- require.Equal(t, tc.expect.deleteIDList, got.deleteIDList)
- })
- }
-}
-
func TestGetIAMPolicyDiff(t *testing.T) {
type Input struct {
oldPolicy map[api.Role][]int