Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: update worksheet visibility (#11090)
ecmadao44e284f31d1a
diff --git a/backend/api/v1/worksheet_service.go b/backend/api/v1/worksheet_service.goindex b7dd7e4e39..2374b4ee2e 100644--- a/backend/api/v1/worksheet_service.go+++ b/backend/api/v1/worksheet_service.go@@ -191,10 +191,9 @@ func (s *WorksheetService) SearchWorksheets(ctx context.Context, request *v1pb.Sswitch spec.operator {case comparatorTypeEqual:worksheetFind.CreatorID = &user.ID- worksheetFind.Visibilities = []store.WorkSheetVisibility{store.ProjectWorkSheet, store.PublicWorkSheet, store.PrivateWorkSheet}case comparatorTypeNotEqual:worksheetFind.ExcludedCreatorID = &user.ID- worksheetFind.Visibilities = []store.WorkSheetVisibility{store.ProjectWorkSheet, store.PublicWorkSheet}+ worksheetFind.Visibilities = []store.WorkSheetVisibility{store.ProjectReadWorkSheet, store.ProjectWriteWorkSheet}worksheetFind.PrincipalID = &user.IDdefault:return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid operator %q for creator", spec.operator))@@ -433,27 +432,37 @@ func (s *WorksheetService) findWorksheet(ctx context.Context, find *store.FindWo// canWriteWorksheet check if the principal can write the worksheet.// worksheet if writable when:-// PRIVATE: the creator only.-// PROJECT: the creator or project role can manage worksheet, workspace Owner and DBA.-// PUBLIC: the creator only.+// PRIVATE: workspace Owner/DBA and the creator only.+// PROJECT_WRITE: workspace Owner/DBA and all members in the project.+// PROJECT_READ: workspace Owner/DBA and project owner.func (s *WorksheetService) canWriteWorksheet(ctx context.Context, worksheet *store.WorkSheetMessage) (bool, error) {user, ok := ctx.Value(common.UserContextKey).(*store.UserMessage)if !ok {return false, status.Errorf(codes.Internal, "user not found")}+ // Worksheet creator and workspace Owner/DBA can always write.if worksheet.CreatorID == user.ID {return true, nil}+ if slices.Contains(user.Roles, api.WorkspaceAdmin) || slices.Contains(user.Roles, api.WorkspaceDBA) {+ return true, nil+ }- if worksheet.Visibility == store.ProjectWorkSheet {- projectRoles, err := s.findProjectRoles(ctx, worksheet.ProjectUID, user)- if err != nil {- return false, err- }- if len(projectRoles) == 0 {- return false, nil- }+ projectRoles, err := s.findProjectRoles(ctx, worksheet.ProjectUID, user)+ if err != nil {+ return false, err+ }+ if len(projectRoles) == 0 {+ return false, nil+ }++ switch worksheet.Visibility {+ case store.PrivateWorkSheet:+ return false, nil+ case store.ProjectWriteWorkSheet:+ return len(projectRoles) > 0, nil+ case store.ProjectReadWorkSheet:return projectRoles[api.ProjectOwner], nil}@@ -462,30 +471,35 @@ func (s *WorksheetService) canWriteWorksheet(ctx context.Context, worksheet *sto// canReadWorksheet check if the principal can read the worksheet.// worksheet is readable when:-// PRIVATE: the creator only.-// PROJECT: the creator and members in the project.-// PUBLIC: everyone in the workspace.+// PRIVATE: workspace Owner/DBA and the creator only.+// PROJECT_WRITE: workspace Owner/DBA and all members in the project.+// PROJECT_READ: workspace Owner/DBA and all members in the project.func (s *WorksheetService) canReadWorksheet(ctx context.Context, worksheet *store.WorkSheetMessage) (bool, error) {user, ok := ctx.Value(common.UserContextKey).(*store.UserMessage)if !ok {return false, status.Errorf(codes.Internal, "user not found")}+ // Worksheet creator and workspace Owner/DBA can always read.+ if worksheet.CreatorID == user.ID {+ return true, nil+ }+ if slices.Contains(user.Roles, api.WorkspaceAdmin) || slices.Contains(user.Roles, api.WorkspaceDBA) {+ return true, nil+ }+switch worksheet.Visibility {case store.PrivateWorkSheet:- return worksheet.CreatorID == user.ID, nil- case store.PublicWorkSheet:- return true, nil- case store.ProjectWorkSheet:- if slices.Contains(user.Roles, api.WorkspaceAdmin) || slices.Contains(user.Roles, api.WorkspaceDBA) {- return true, nil- }+ return false, nil+ case store.ProjectReadWorkSheet, store.ProjectWriteWorkSheet:+ // For project level visibility, users can read the worksheet as long as they're the project member.projectRoles, err := s.findProjectRoles(ctx, worksheet.ProjectUID, user)if err != nil {return false, err}return len(projectRoles) > 0, nil}+return false, nil}@@ -514,10 +528,10 @@ func (s *WorksheetService) convertToAPIWorksheetMessage(ctx context.Context, worvisibility := v1pb.Worksheet_VISIBILITY_UNSPECIFIEDswitch worksheet.Visibility {- case store.PublicWorkSheet:- visibility = v1pb.Worksheet_VISIBILITY_PUBLIC- case store.ProjectWorkSheet:- visibility = v1pb.Worksheet_VISIBILITY_PROJECT+ case store.ProjectReadWorkSheet:+ visibility = v1pb.Worksheet_VISIBILITY_PROJECT_READ+ case store.ProjectWriteWorkSheet:+ visibility = v1pb.Worksheet_VISIBILITY_PROJECT_WRITEcase store.PrivateWorkSheet:visibility = v1pb.Worksheet_VISIBILITY_PRIVATE}@@ -573,10 +587,10 @@ func convertToStoreWorksheetVisibility(visibility v1pb.Worksheet_Visibility) (stswitch visibility {case v1pb.Worksheet_VISIBILITY_UNSPECIFIED:return store.WorkSheetVisibility(""), status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid visibility %q", visibility))- case v1pb.Worksheet_VISIBILITY_PUBLIC:- return store.PublicWorkSheet, nil- case v1pb.Worksheet_VISIBILITY_PROJECT:- return store.ProjectWorkSheet, nil+ case v1pb.Worksheet_VISIBILITY_PROJECT_READ:+ return store.ProjectReadWorkSheet, nil+ case v1pb.Worksheet_VISIBILITY_PROJECT_WRITE:+ return store.ProjectWriteWorkSheet, nilcase v1pb.Worksheet_VISIBILITY_PRIVATE:return store.PrivateWorkSheet, nildefault:diff --git a/backend/migrator/migration/prod/2.15/0000##worksheet_visibility.sql b/backend/migrator/migration/prod/2.15/0000##worksheet_visibility.sqlnew file mode 100644index 0000000000..09b937ac23--- /dev/null+++ b/backend/migrator/migration/prod/2.15/0000##worksheet_visibility.sql@@ -0,0 +1,2 @@+UPDATE worksheet SET visibility = 'PROJECT_READ' WHERE visibility = 'PUBLIC';+UPDATE worksheet SET visibility = 'PROJECT_READ' WHERE visibility = 'PROJECT';diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.goindex f186829e1c..c2a4250c7e 100644--- a/backend/migrator/migrator_test.go+++ b/backend/migrator/migrator_test.go@@ -230,5 +230,5 @@ func TestMigrationCompatibility(t *testing.T) {func TestGetCutoffVersion(t *testing.T) {releaseVersion, err := getProdCutoffVersion()require.NoError(t, err)- require.Equal(t, semver.MustParse("2.14.2"), releaseVersion)+ require.Equal(t, semver.MustParse("2.15.0"), releaseVersion)}diff --git a/backend/server/onboard.go b/backend/server/onboard.goindex d9697c09bd..055f080e4f 100644--- a/backend/server/onboard.go+++ b/backend/server/onboard.go@@ -180,7 +180,7 @@ func (s *Server) generateOnboardingData(ctx context.Context, user *store.UserMesDatabaseUID: &prodDatabase.UID,Title: "Sample Sheet",Statement: "SELECT * FROM salary;",- Visibility: store.ProjectWorkSheet,+ Visibility: store.ProjectReadWorkSheet,}); err != nil {return errors.Wrapf(err, "failed to create sample work sheet")}diff --git a/backend/store/worksheet.go b/backend/store/worksheet.goindex 65db3ef9e0..422bf360df 100644--- a/backend/store/worksheet.go+++ b/backend/store/worksheet.go@@ -20,10 +20,10 @@ type WorkSheetVisibility stringconst (// PrivateWorkSheet is the sheet visibility for PRIVATE. Only sheet OWNER can read/write.PrivateWorkSheet WorkSheetVisibility = "PRIVATE"- // ProjectWorkSheet is the sheet visibility for PROJECT. Both sheet OWNER and project OWNER can read/write, and project DEVELOPER can read.- ProjectWorkSheet WorkSheetVisibility = "PROJECT"- // PublicWorkSheet is the sheet visibility for PUBLIC. Sheet OWNER can read/write, and all others can read.- PublicWorkSheet WorkSheetVisibility = "PUBLIC"+ // ProjectReadWorkSheet is the sheet visibility for PROJECT. Both sheet OWNER and project OWNER can read/write, and project DEVELOPER can read.+ ProjectReadWorkSheet WorkSheetVisibility = "PROJECT_READ"+ // ProjectWriteWorkSheet is the sheet visibility for PROJECT. Both sheet OWNER and project OWNER can read/write, and project DEVELOPER can read.+ ProjectWriteWorkSheet WorkSheetVisibility = "PROJECT_WRITE")// WorkSheetMessage is the message for a sheet.diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 079a4ca1d9..ead0df0a53 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -2254,9 +2254,10 @@"link-access": "Link access","private": "Private","private-desc": "Only you can access this sheet",- "project-desc": "Both sheet OWNER and project OWNER can read/write, and project DEVELOPER can read",- "public": "Public",- "public-desc": "Sheet OWNER can read/write, and all others can read",+ "project-read": "Project read",+ "project-read-desc": "Both sheet OWNER and project OWNER can read/write, other project members can read",+ "project-write": "Project write",+ "project-write-desc": "Both sheet OWNER and project members can read/write","create-read-only-data-source": "Go to create","go-back": "Go Back","save-sheet": "Save Sheet",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 64777ea80d..b88352e977 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -2254,9 +2254,10 @@"link-access": "Acceso al enlace","private": "Privado","private-desc": "Solo tú puedes acceder a esta hoja",- "project-desc": "Tanto el DUEÑO de la hoja como el DUEÑO del proyecto pueden leer/escribir, y el DESARROLLADOR del proyecto solo puede leer",- "public": "Público",- "public-desc": "El DUEÑO de la hoja puede leer/escribir, y todos los demás pueden leer",+ "project-read": "Lectura del proyecto",+ "project-read-desc": "Tanto el PROPIETARIO de la hoja como el PROPIETARIO del proyecto pueden leer/escribir, otros miembros del proyecto pueden leer",+ "project-write": "Escritura del proyecto",+ "project-write-desc": "Tanto el PROPIETARIO de la hoja como los miembros del proyecto pueden leer/escribir","create-read-only-data-source": "Ir a crear","go-back": "Volver","save-sheet": "Guardar hoja",diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex f8baf5d773..1c72a08c37 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -2254,9 +2254,10 @@"link-access": "リンクアクセス","private": "プライベート","private-desc": "このシートにはあなたのみがアクセスできます",- "project-desc": "シートの所有者とプロジェクトの所有者は読み書きができ、プロジェクトの開発者は読み取りができます",- "public": "パブリック",- "public-desc": "シートの所有者は読み書きができ、他の全員は読み取りができます",+ "project-read": "プロジェクトの読み取り",+ "project-read-desc": "シート OWNER とプロジェクト OWNER の両方が読み取り/書き込み可能、他のプロジェクト メンバーは読み取り可能",+ "project-write": "プロジェクトの書き込み",+ "project-write-desc": "シート所有者とプロジェクト メンバーの両方が読み取り/書き込み可能","create-read-only-data-source": "作成へ進む","go-back": "戻る","save-sheet": "シートを保存",diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 58145dd3cb..7898bd9b06 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -2254,9 +2254,10 @@"link-access": "Truy cập liên kết","private": "Riêng tư","private-desc": "Chỉ bạn mới có thể truy cập trang tính này",- "project-desc": "Cả trang tính CHỦ SỞ HỮU và CHỦ SỞ HỮU dự án đều có thể đọc/ghi và NHÀ PHÁT TRIỂN dự án có thể đọc",- "public": "Công cộng",- "public-desc": "Trang tính CHỦ SỞ HỮU có thể đọc/ghi và tất cả những người khác có thể đọc",+ "project-read": "Dự án đọc",+ "project-read-desc": "Cả trang tính CHỦ SỞ HỮU và CHỦ SỞ HỮU dự án đều có thể đọc/ghi, các thành viên dự án khác có thể đọc",+ "project-write": "Viết dự án",+ "project-write-desc": "Cả trang tính CHỦ SỞ HỮU và thành viên dự án đều có thể đọc/ghi","create-read-only-data-source": "Đi để tạo","go-back": "Quay lại","save-sheet": "Lưu trang tính",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex a69b9a4386..feeb906e33 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -2254,9 +2254,10 @@"link-access": "链接访问权限","private": "私有","private-desc": "只有您自己可以访问此工作表",- "project-desc": "工作表所有者或者项目所有者拥有读、写权限,项目开发者拥有只读权限",- "public": "公开",- "public-desc": "工作表所有者拥有读写权限,其他人只拥有只读权限.",+ "project-read": "项目内可读",+ "project-read-desc": "工作表所有者或者项目所有者拥有读、写权限,其他成员拥有只读权限",+ "project-write": "项目内读写",+ "project-write-desc": "工作表所有者和项目内成员都有读写权限","create-read-only-data-source": "前去创建","go-back": "返回","save-sheet": "保存工作表",diff --git a/frontend/src/types/proto/v1/worksheet_service.ts b/frontend/src/types/proto/v1/worksheet_service.tsindex 19c02beaac..3c41a8ccfb 100644--- a/frontend/src/types/proto/v1/worksheet_service.ts+++ b/frontend/src/types/proto/v1/worksheet_service.ts@@ -164,10 +164,10 @@ export interface Worksheet {export enum Worksheet_Visibility {VISIBILITY_UNSPECIFIED = 0,- /** VISIBILITY_PUBLIC - Public, worksheet OWNER can read/write, and all others can read. */- VISIBILITY_PUBLIC = 1,- /** VISIBILITY_PROJECT - Project, worksheet OWNER and project OWNER can read/write, and project DEVELOPER can read. */- VISIBILITY_PROJECT = 2,+ /** VISIBILITY_PROJECT_READ - Read access in project scope, worksheet OWNER/DBA and project OWNER can read/write, and project DEVELOPER can read. */+ VISIBILITY_PROJECT_READ = 1,+ /** VISIBILITY_PROJECT_WRITE - Write access in project scope, worksheet OWNER/DBA and all members in the project can write the worksheet. */+ VISIBILITY_PROJECT_WRITE = 2,/** VISIBILITY_PRIVATE - Private, only worksheet OWNER can read/write. */VISIBILITY_PRIVATE = 3,UNRECOGNIZED = -1,@@ -179,11 +179,11 @@ export function worksheet_VisibilityFromJSON(object: any): Worksheet_Visibilitycase "VISIBILITY_UNSPECIFIED":return Worksheet_Visibility.VISIBILITY_UNSPECIFIED;case 1:- case "VISIBILITY_PUBLIC":- return Worksheet_Visibility.VISIBILITY_PUBLIC;+ case "VISIBILITY_PROJECT_READ":+ return Worksheet_Visibility.VISIBILITY_PROJECT_READ;case 2:- case "VISIBILITY_PROJECT":- return Worksheet_Visibility.VISIBILITY_PROJECT;+ case "VISIBILITY_PROJECT_WRITE":+ return Worksheet_Visibility.VISIBILITY_PROJECT_WRITE;case 3:case "VISIBILITY_PRIVATE":return Worksheet_Visibility.VISIBILITY_PRIVATE;@@ -198,10 +198,10 @@ export function worksheet_VisibilityToJSON(object: Worksheet_Visibility): stringswitch (object) {case Worksheet_Visibility.VISIBILITY_UNSPECIFIED:return "VISIBILITY_UNSPECIFIED";- case Worksheet_Visibility.VISIBILITY_PUBLIC:- return "VISIBILITY_PUBLIC";- case Worksheet_Visibility.VISIBILITY_PROJECT:- return "VISIBILITY_PROJECT";+ case Worksheet_Visibility.VISIBILITY_PROJECT_READ:+ return "VISIBILITY_PROJECT_READ";+ case Worksheet_Visibility.VISIBILITY_PROJECT_WRITE:+ return "VISIBILITY_PROJECT_WRITE";case Worksheet_Visibility.VISIBILITY_PRIVATE:return "VISIBILITY_PRIVATE";case Worksheet_Visibility.UNRECOGNIZED:diff --git a/frontend/src/utils/v1/worksheet.ts b/frontend/src/utils/v1/worksheet.tsindex 6b6fe5633f..e5ceaef732 100644--- a/frontend/src/utils/v1/worksheet.ts+++ b/frontend/src/utils/v1/worksheet.ts@@ -1,10 +1,11 @@import { useCurrentUserV1, useProjectV1Store } from "@/store";import { getUserEmailFromIdentifier } from "@/store/modules/v1/common";+import { PresetRoleType } from "@/types";import {Worksheet,Worksheet_Visibility,} from "@/types/proto/v1/worksheet_service";-import { hasProjectPermissionV2 } from "@/utils";+import { isMemberOfProjectV1, isOwnerOfProjectV1 } from "@/utils";export const extractWorksheetUID = (name: string) => {const pattern = /(?:^|\/)worksheets\/([^/]+)(?:$|\/)/;@@ -12,60 +13,64 @@ export const extractWorksheetUID = (name: string) => {return matches?.[1] ?? "-1";};+// readable to+// PRIVATE: workspace Owner/DBA and the creator only.+// PROJECT_WRITE: workspace Owner/DBA and all members in the project.+// PROJECT_READ: workspace Owner/DBA and all members in the project.export const isWorksheetReadableV1 = (sheet: Worksheet) => {const currentUserV1 = useCurrentUserV1();- // readable to- // PRIVATE: the creator only- // PROJECT: the creator and members in the project, workspace Owner and DBA- // PUBLIC: everyone-if (getUserEmailFromIdentifier(sheet.creator) === currentUserV1.value.email) {// Always readable to the creatorreturn true;}- const { visibility } = sheet;- if (visibility === Worksheet_Visibility.VISIBILITY_PRIVATE) {- return false;++ if (+ currentUserV1.value.roles.includes(PresetRoleType.WORKSPACE_ADMIN) ||+ currentUserV1.value.roles.includes(PresetRoleType.WORKSPACE_DBA)+ ) {+ return true;}- if (visibility === Worksheet_Visibility.VISIBILITY_PROJECT) {- const projectV1 = useProjectV1Store().getProjectByName(sheet.project);- return hasProjectPermissionV2(- projectV1,- currentUserV1.value,- "bb.projects.get"- );+ switch (sheet.visibility) {+ case Worksheet_Visibility.VISIBILITY_PRIVATE:+ return false;+ case Worksheet_Visibility.VISIBILITY_PROJECT_READ:+ case Worksheet_Visibility.VISIBILITY_PROJECT_WRITE: {+ const projectV1 = useProjectV1Store().getProjectByName(sheet.project);+ return isMemberOfProjectV1(projectV1.iamPolicy, currentUserV1.value);+ }}- // visibility === "PUBLIC"- return true;+ return false;};+// writable to+// PRIVATE: workspace Owner/DBA and the creator only.+// PROJECT_WRITE: workspace Owner/DBA and all members in the project.+// PROJECT_READ: workspace Owner/DBA and project owner.export const isWorksheetWritableV1 = (sheet: Worksheet) => {const currentUserV1 = useCurrentUserV1();- // writable to- // PRIVATE: the creator only- // PROJECT: the creator or project role can manage sheet, workspace Owner and DBA- // PUBLIC: the creator only-if (getUserEmailFromIdentifier(sheet.creator) === currentUserV1.value.email) {// Always writable to the creatorreturn true;}- const { visibility } = sheet;- if (visibility === Worksheet_Visibility.VISIBILITY_PRIVATE) {- return false;+ if (+ currentUserV1.value.roles.includes(PresetRoleType.WORKSPACE_ADMIN) ||+ currentUserV1.value.roles.includes(PresetRoleType.WORKSPACE_DBA)+ ) {+ return true;}- if (visibility === Worksheet_Visibility.VISIBILITY_PROJECT) {- const projectV1 = useProjectV1Store().getProjectByName(sheet.project);- return hasProjectPermissionV2(- projectV1,- currentUserV1.value,- "bb.projects.get"- );+ const projectV1 = useProjectV1Store().getProjectByName(sheet.project);+ switch (sheet.visibility) {+ case Worksheet_Visibility.VISIBILITY_PRIVATE:+ return false;+ case Worksheet_Visibility.VISIBILITY_PROJECT_WRITE:+ return isMemberOfProjectV1(projectV1.iamPolicy, currentUserV1.value);+ case Worksheet_Visibility.VISIBILITY_PROJECT_READ:+ return isOwnerOfProjectV1(projectV1.iamPolicy, currentUserV1.value);}- // visibility === "PUBLIC"+return false;};diff --git a/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue b/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vueindex b63b817c43..75b4fe5428 100644--- a/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue+++ b/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue@@ -525,6 +525,7 @@ const selectAllFromTableOrView = async (node: SQLEditorTreeNode) => {...tab,title: suggestedTabTitleForSQLEditorConnection(tab.connection),statement: tabStore.currentTab.statement || statement,+ status: "DIRTY",});} else {// Otherwise select or add a new tab and set its connectiondiff --git a/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue b/frontend/src/views/sql-editor/EditorCommon/SharePopover.vueindex 655ca9e5ba..465ed3b2f9 100644--- a/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue+++ b/frontend/src/views/sql-editor/EditorCommon/SharePopover.vue@@ -129,14 +129,14 @@ const accessOptions = computed<AccessOption[]>(() => {description: t("sql-editor.private-desc"),},{- label: t("common.project"),- value: Worksheet_Visibility.VISIBILITY_PROJECT,- description: t("sql-editor.project-desc"),+ label: t("sql-editor.project-read"),+ value: Worksheet_Visibility.VISIBILITY_PROJECT_READ,+ description: t("sql-editor.project-read-desc"),},{- label: t("sql-editor.public"),- value: Worksheet_Visibility.VISIBILITY_PUBLIC,- description: t("sql-editor.public-desc"),+ label: t("sql-editor.project-write"),+ value: Worksheet_Visibility.VISIBILITY_PROJECT_WRITE,+ description: t("sql-editor.project-write-desc"),},];});diff --git a/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetTable.vue b/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetTable.vueindex e4699ae423..379e78147c 100644--- a/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetTable.vue+++ b/frontend/src/views/sql-editor/SheetPanel/SheetTable/SheetTable.vue@@ -136,10 +136,10 @@ const visibilityDisplayName = (visibility: Worksheet_Visibility) => {switch (visibility) {case Worksheet_Visibility.VISIBILITY_PRIVATE:return t("sql-editor.private");- case Worksheet_Visibility.VISIBILITY_PROJECT:- return t("common.project");- case Worksheet_Visibility.VISIBILITY_PUBLIC:- return t("sql-editor.public");+ case Worksheet_Visibility.VISIBILITY_PROJECT_READ:+ return t("sql-editor.project-read");+ case Worksheet_Visibility.VISIBILITY_PROJECT_WRITE:+ return t("sql-editor.project-write");default:return "";}diff --git a/frontend/src/views/sql-editor/TabList/TabItem/Prefix.vue b/frontend/src/views/sql-editor/TabList/TabItem/Prefix.vueindex a99d705ca3..a5bcf76209 100644--- a/frontend/src/views/sql-editor/TabList/TabItem/Prefix.vue+++ b/frontend/src/views/sql-editor/TabList/TabItem/Prefix.vue@@ -1,16 +1,12 @@<template><SheetConnectionIcon :tab="tab" class="w-4 h-4" />-- <template v-if="sheet">- <heroicons-outline:user-group- v-if="sheet.visibility === Worksheet_Visibility.VISIBILITY_PROJECT"- class="w-4 h-4"- />- <heroicons-outline:globe- v-if="sheet.visibility === Worksheet_Visibility.VISIBILITY_PUBLIC"- class="w-4 h-4"- />- </template>+ <heroicons-outline:user-group+ v-if="+ sheet?.visibility === Worksheet_Visibility.VISIBILITY_PROJECT_READ ||+ sheet?.visibility === Worksheet_Visibility.VISIBILITY_PROJECT_WRITE+ "+ class="w-4 h-4"+ /><template v-if="tab.mode === 'ADMIN'"><heroicons-outline:wrench class="w-4 h-4" /></template>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex e2dc7ce8a2..64963a5bec 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -10146,8 +10146,8 @@ The worksheet's `name` field is used to identify the worksheet to update. Fo| Name | Number | Description || ---- | ------ | ----------- || VISIBILITY_UNSPECIFIED | 0 | |-| VISIBILITY_PUBLIC | 1 | Public, worksheet OWNER can read/write, and all others can read. |-| VISIBILITY_PROJECT | 2 | Project, worksheet OWNER and project OWNER can read/write, and project DEVELOPER can read. |+| VISIBILITY_PROJECT_READ | 1 | Read access in project scope, worksheet OWNER/DBA and project OWNER can read/write, and project DEVELOPER can read. |+| VISIBILITY_PROJECT_WRITE | 2 | Write access in project scope, worksheet OWNER/DBA and all members in the project can write the worksheet. || VISIBILITY_PRIVATE | 3 | Private, only worksheet OWNER can read/write. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex e1af661b6f..9ff535ccb6 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -27844,15 +27844,15 @@ Format: worksheets/{worksheet} </p></td></tr><tr>- <td>VISIBILITY_PUBLIC</td>+ <td>VISIBILITY_PROJECT_READ</td><td>1</td>- <td><p>Public, worksheet OWNER can read/write, and all others can read.</p></td>+ <td><p>Read access in project scope, worksheet OWNER/DBA and project OWNER can read/write, and project DEVELOPER can read.</p></td></tr><tr>- <td>VISIBILITY_PROJECT</td>+ <td>VISIBILITY_PROJECT_WRITE</td><td>2</td>- <td><p>Project, worksheet OWNER and project OWNER can read/write, and project DEVELOPER can read.</p></td>+ <td><p>Write access in project scope, worksheet OWNER/DBA and all members in the project can write the worksheet.</p></td></tr><tr>diff --git a/proto/generated-go/v1/worksheet_service.pb.go b/proto/generated-go/v1/worksheet_service.pb.goindex 011b7a9ced..87e1105e26 100644--- a/proto/generated-go/v1/worksheet_service.pb.go+++ b/proto/generated-go/v1/worksheet_service.pb.go@@ -28,10 +28,10 @@ type Worksheet_Visibility int32const (Worksheet_VISIBILITY_UNSPECIFIED Worksheet_Visibility = 0- // Public, worksheet OWNER can read/write, and all others can read.- Worksheet_VISIBILITY_PUBLIC Worksheet_Visibility = 1- // Project, worksheet OWNER and project OWNER can read/write, and project DEVELOPER can read.- Worksheet_VISIBILITY_PROJECT Worksheet_Visibility = 2+ // Read access in project scope, worksheet OWNER/DBA and project OWNER can read/write, and project DEVELOPER can read.+ Worksheet_VISIBILITY_PROJECT_READ Worksheet_Visibility = 1+ // Write access in project scope, worksheet OWNER/DBA and all members in the project can write the worksheet.+ Worksheet_VISIBILITY_PROJECT_WRITE Worksheet_Visibility = 2// Private, only worksheet OWNER can read/write.Worksheet_VISIBILITY_PRIVATE Worksheet_Visibility = 3)@@ -40,15 +40,15 @@ const (var (Worksheet_Visibility_name = map[int32]string{0: "VISIBILITY_UNSPECIFIED",- 1: "VISIBILITY_PUBLIC",- 2: "VISIBILITY_PROJECT",+ 1: "VISIBILITY_PROJECT_READ",+ 2: "VISIBILITY_PROJECT_WRITE",3: "VISIBILITY_PRIVATE",}Worksheet_Visibility_value = map[string]int32{- "VISIBILITY_UNSPECIFIED": 0,- "VISIBILITY_PUBLIC": 1,- "VISIBILITY_PROJECT": 2,- "VISIBILITY_PRIVATE": 3,+ "VISIBILITY_UNSPECIFIED": 0,+ "VISIBILITY_PROJECT_READ": 1,+ "VISIBILITY_PROJECT_WRITE": 2,+ "VISIBILITY_PRIVATE": 3,})@@ -761,7 +761,7 @@ var file_v1_worksheet_service_proto_rawDesc = []byte{0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f,0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22,- 0xbf, 0x04, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1a, 0x0a,+ 0xcb, 0x04, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1a, 0x0a,0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02,0xe0, 0x41, 0x05, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x72, 0x6f,0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,@@ -790,70 +790,71 @@ var file_v1_worksheet_service_proto_rawDesc = []byte{0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,0x79, 0x12, 0x1d, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01,0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64,- 0x22, 0x6f, 0x0a, 0x0a, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a,+ 0x22, 0x7b, 0x0a, 0x0a, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a,0x0a, 0x16, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53,- 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49,- 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10,- 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f,- 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x53,- 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10,- 0x03, 0x32, 0xeb, 0x06, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x53,- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74,- 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57,- 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,- 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f,- 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x34, 0xda, 0x41, 0x10, 0x70, 0x61, 0x72, 0x65,- 0x6e, 0x74, 0x2c, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x82, 0xd3, 0xe4, 0x93,- 0x02, 0x1b, 0x3a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x0e, 0x2f,- 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x12, 0x70, 0x0a,- 0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x20, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57,- 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,- 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f,- 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x26, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65,- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,- 0x65, 0x3d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12,- 0x7e, 0x0a, 0x10, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65,- 0x65, 0x74, 0x73, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65,- 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x57, 0x6f,- 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,- 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f,- 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12,- 0x9c, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68,- 0x65, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65,- 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74,- 0x22, 0x4c, 0xda, 0x41, 0x15, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2c, 0x75,- 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e,- 0x3a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x32, 0x21, 0x2f, 0x76, 0x31,- 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65,- 0x3d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xc6,- 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65,- 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,- 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,- 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65,- 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x22, 0x5b, 0xda, 0x41, 0x15, 0x6f,- 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,- 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x3a, 0x09, 0x6f, 0x72, 0x67, 0x61,- 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x32, 0x30, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61,- 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x3d,- 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x72,- 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x76, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74,- 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57,- 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 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, 0x26, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65,- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,- 0x65, 0x3d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 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,+ 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x49,+ 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54,+ 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x49, 0x53, 0x49, 0x42,+ 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x57, 0x52,+ 0x49, 0x54, 0x45, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c,+ 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x03, 0x32, 0xeb, 0x06,+ 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69,+ 0x63, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72,+ 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73,+ 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68,+ 0x65, 0x65, 0x74, 0x22, 0x34, 0xda, 0x41, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x77,+ 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x09,+ 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x77,+ 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x12, 0x70, 0x0a, 0x0c, 0x47, 0x65, 0x74,+ 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73,+ 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68,+ 0x65, 0x65, 0x74, 0x22, 0x26, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93,+ 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x77, 0x6f,+ 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7e, 0x0a, 0x10, 0x53,+ 0x65, 0x61, 0x72, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x12,+ 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65,+ 0x61, 0x72, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68,+ 0x65, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3,+ 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68,+ 0x65, 0x65, 0x74, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x9c, 0x01, 0x0a, 0x0f,+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12,+ 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70,+ 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71,+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x4c, 0xda, 0x41,+ 0x15, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74,+ 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x09, 0x77, 0x6f,+ 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x32, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x77, 0x6f,+ 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x77, 0x6f, 0x72,+ 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xc6, 0x01, 0x0a, 0x18, 0x55,+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x4f, 0x72,+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b,+ 0x73, 0x68, 0x65, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x4f, 0x72, 0x67,+ 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x22, 0x5b, 0xda, 0x41, 0x15, 0x6f, 0x72, 0x67, 0x61, 0x6e,+ 0x69, 0x7a, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b,+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x3a, 0x09, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65,+ 0x72, 0x32, 0x30, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65,+ 0x72, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x3d, 0x77, 0x6f, 0x72, 0x6b,+ 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69,+ 0x7a, 0x65, 0x72, 0x12, 0x76, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72,+ 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73,+ 0x68, 0x65, 0x65, 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, 0x26, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93,+ 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x77, 0x6f,+ 0x72, 0x6b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 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 (diff --git a/proto/v1/worksheet_service.proto b/proto/v1/worksheet_service.protoindex 3aeb2df591..601d1653a0 100644--- a/proto/v1/worksheet_service.proto+++ b/proto/v1/worksheet_service.proto@@ -181,10 +181,10 @@ message Worksheet {enum Visibility {VISIBILITY_UNSPECIFIED = 0;- // Public, worksheet OWNER can read/write, and all others can read.- VISIBILITY_PUBLIC = 1;- // Project, worksheet OWNER and project OWNER can read/write, and project DEVELOPER can read.- VISIBILITY_PROJECT = 2;+ // Read access in project scope, worksheet OWNER/DBA and project OWNER can read/write, other project members can read.+ VISIBILITY_PROJECT_READ = 1;+ // Write access in project scope, worksheet OWNER/DBA and all members in the project can write the worksheet.+ VISIBILITY_PROJECT_WRITE = 2;// Private, only worksheet OWNER can read/write.VISIBILITY_PRIVATE = 3;}