Skip to content

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

refactor: move workspace branding to workspace table payload (#19734)

ecmadao3573d1c49262
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yaml
index 9cc48d7f75..fd262458d1 100644
--- a/backend/api/mcp/gen/openapi.yaml
+++ b/backend/api/mcp/gen/openapi.yaml
@@ -331,44 +331,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ActuatorInfo'
- /bytebase.v1.ActuatorService/GetResourcePackage:
- post:
- tags:
- - bytebase.v1.ActuatorService
- summary: GetResourcePackage
- description: |-
- Gets custom branding resources such as logos.
- Permissions required: None
- operationId: bytebase.v1.ActuatorService.GetResourcePackage
- parameters:
- - name: Connect-Protocol-Version
- in: header
- required: true
- schema:
- $ref: '#/components/schemas/connect-protocol-version'
- - name: Connect-Timeout-Ms
- in: header
- schema:
- $ref: '#/components/schemas/connect-timeout-header'
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.GetResourcePackageRequest'
- required: true
- responses:
- default:
- description: Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/connect.error'
- "200":
- description: Success
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.ResourcePackage'
/bytebase.v1.ActuatorService/GetWorkspaceActuatorInfo:
post:
tags:
@@ -6979,6 +6941,47 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.IamPolicy'
+ /bytebase.v1.WorkspaceService/GetWorkspace:
+ post:
+ tags:
+ - bytebase.v1.WorkspaceService
+ summary: GetWorkspace
+ description: |-
+ Gets a workspace by name.
+ Supports "workspaces/-" to resolve the current workspace:
+ - Authenticated: uses the workspace from JWT context
+ - Self-hosted unauthenticated: returns the single workspace
+ - SaaS unauthenticated: returns minimal response
+ operationId: bytebase.v1.WorkspaceService.GetWorkspace
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ required: true
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ - name: Connect-Timeout-Ms
+ in: header
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetWorkspaceRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Workspace'
/bytebase.v1.WorkspaceService/ListWorkspaces:
post:
tags:
@@ -11151,18 +11154,6 @@ components:
description: 'Format: projects/{project}/releases/{release}'
title: GetReleaseRequest
additionalProperties: false
- bytebase.v1.GetResourcePackageRequest:
- type: object
- properties:
- name:
- type: string
- title: name
- description: |-
- Optional workspace name, format: workspaces/{workspace}.
- Set when using the workspace-scoped URL pattern.
- title: GetResourcePackageRequest
- additionalProperties: false
- description: Request message for getting branding resources.
bytebase.v1.GetReviewConfigRequest:
type: object
properties:
@@ -11378,6 +11369,17 @@ components:
title: GetWorkspaceActuatorInfoRequest
additionalProperties: false
description: Request message for getting workspace-scoped actuator information.
+ bytebase.v1.GetWorkspaceRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The workspace name, format: workspaces/{workspace}.
+ Use "workspaces/-" to get the current/default workspace.
+ title: GetWorkspaceRequest
+ additionalProperties: false
bytebase.v1.GridLevel:
type: object
properties:
@@ -15369,17 +15371,6 @@ components:
title: RequestMetadata
additionalProperties: false
description: Metadata about the incoming request.
- bytebase.v1.ResourcePackage:
- type: object
- properties:
- logo:
- type: string
- title: logo
- format: byte
- description: The branding logo.
- title: ResourcePackage
- additionalProperties: false
- description: Custom branding resources for the Bytebase instance.
bytebase.v1.Restriction:
type: object
properties:
@@ -19365,6 +19356,10 @@ components:
title:
type: string
title: title
+ logo:
+ type: string
+ title: logo
+ description: The branding logo.
title: Workspace
additionalProperties: false
bytebase.v1.WorkspaceApprovalSetting:
@@ -19499,10 +19494,6 @@ components:
type: string
title: directory_sync_token
description: The token for directory sync authentication.
- brandingLogo:
- type: string
- title: branding_logo
- description: The branding logo as a data URI (e.g. data:image/png;base64,...).
passwordRestriction:
title: password_restriction
description: Password restriction settings.
diff --git a/backend/api/v1/actuator_service.go b/backend/api/v1/actuator_service.go
index 9e1d4ec1e7..bfef24bd59 100644
--- a/backend/api/v1/actuator_service.go
+++ b/backend/api/v1/actuator_service.go
@@ -93,40 +93,6 @@ func (s *ActuatorService) DeleteCache(
return connect.NewResponse(&emptypb.Empty{}), nil
}
-// GetResourcePackage gets the theme resources.
-// Serves both /v1/actuator/resources and /v1/{name=workspaces/*}/actuator/resources.
-func (s *ActuatorService) GetResourcePackage(
- ctx context.Context,
- req *connect.Request[v1pb.GetResourcePackageRequest],
-) (*connect.Response[v1pb.ResourcePackage], error) {
- var workspaceID string
- if !s.profile.SaaS {
- ws, err := s.store.GetWorkspaceID(ctx)
- if err != nil {
- return nil, connect.NewError(connect.CodeInternal, err)
- }
- workspaceID = ws
- } else if req.Msg.Name != "" {
- reqWorkspaceID, err := common.GetWorkspaceID(req.Msg.Name)
- if err != nil {
- return nil, connect.NewError(connect.CodeInvalidArgument, err)
- }
- workspaceID = reqWorkspaceID
- }
-
- pkg := &v1pb.ResourcePackage{}
-
- if workspaceID != "" {
- workspaceProfileSetting, err := s.store.GetWorkspaceProfileSetting(ctx, workspaceID)
- if err != nil {
- return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to find workspace profile setting"))
- }
- pkg.Logo = []byte(workspaceProfileSetting.BrandingLogo)
- }
-
- return connect.NewResponse(pkg), nil
-}
-
// SetupSample sets up the sample project and instance.
func (s *ActuatorService) SetupSample(
ctx context.Context,
@@ -266,7 +232,8 @@ func (s *ActuatorService) getUsedFeatures(ctx context.Context, workspaceID strin
if setting.Watermark {
features = append(features, v1pb.PlanFeature_FEATURE_WATERMARK)
}
- if setting.BrandingLogo != "" {
+ ws, err := s.store.GetWorkspaceByID(ctx, workspaceID)
+ if err == nil && ws != nil && ws.Payload.GetLogo() != "" {
features = append(features, v1pb.PlanFeature_FEATURE_CUSTOM_LOGO)
}
diff --git a/backend/api/v1/auth_service.go b/backend/api/v1/auth_service.go
index 7ae27eebeb..4b7a22d179 100644
--- a/backend/api/v1/auth_service.go
+++ b/backend/api/v1/auth_service.go
@@ -266,7 +266,7 @@ func (s *AuthService) Signup(ctx context.Context, req *connect.Request[v1pb.Sign
}
ws, err := s.store.CreateWorkspace(ctx, &store.WorkspaceMessage{
ResourceID: wsID,
- Name: "Default workspace",
+ Payload: &storepb.WorkspacePayload{Title: "Default workspace"},
}, request.Email)
if err != nil {
return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to create workspace"))
@@ -649,7 +649,7 @@ func (s *AuthService) getOrCreateUserWithIDP(ctx context.Context, request *v1pb.
}
ws, err := s.store.CreateWorkspace(ctx, &store.WorkspaceMessage{
ResourceID: wsID,
- Name: "Default workspace",
+ Payload: &storepb.WorkspacePayload{Title: "My Workspace"},
}, email)
if err != nil {
return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to create workspace"))
diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.go
index c42127a77d..88a197000b 100644
--- a/backend/api/v1/setting_service.go
+++ b/backend/api/v1/setting_service.go
@@ -333,11 +333,6 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *connect.Req
payload.DirectorySyncToken = uuid.New().String()
}
oldSetting.DirectorySyncToken = payload.DirectorySyncToken
- case "value.workspace_profile.branding_logo":
- if err := s.licenseService.IsFeatureEnabled(ctx, workspaceID, v1pb.PlanFeature_FEATURE_CUSTOM_LOGO); err != nil {
- return nil, connect.NewError(connect.CodePermissionDenied, err)
- }
- oldSetting.BrandingLogo = payload.BrandingLogo
case "value.workspace_profile.password_restriction":
if err := s.licenseService.IsFeatureEnabled(ctx, workspaceID, v1pb.PlanFeature_FEATURE_PASSWORD_RESTRICTIONS); err != nil {
return nil, connect.NewError(connect.CodePermissionDenied, err)
diff --git a/backend/api/v1/setting_service_converter.go b/backend/api/v1/setting_service_converter.go
index a2c0dfe333..0eb0308856 100644
--- a/backend/api/v1/setting_service_converter.go
+++ b/backend/api/v1/setting_service_converter.go
@@ -249,7 +249,6 @@ func convertWorkspaceProfileSetting(v1Setting *v1pb.WorkspaceProfileSetting) *st
EnableAuditLogStdout: v1Setting.EnableAuditLogStdout,
Watermark: v1Setting.Watermark,
DirectorySyncToken: v1Setting.DirectorySyncToken,
- BrandingLogo: v1Setting.BrandingLogo,
PasswordRestriction: convertToStorePasswordRestriction(v1Setting.PasswordRestriction),
EnableDebug: v1Setting.EnableDebug,
SqlResultSize: v1Setting.SqlResultSize,
@@ -322,7 +321,6 @@ func convertToWorkspaceProfileSetting(storeSetting *storepb.WorkspaceProfileSett
EnableAuditLogStdout: storeSetting.EnableAuditLogStdout,
Watermark: storeSetting.Watermark,
DirectorySyncToken: storeSetting.DirectorySyncToken,
- BrandingLogo: storeSetting.BrandingLogo,
PasswordRestriction: convertToPasswordRestrictionSetting(storeSetting.PasswordRestriction),
Announcement: convertToV1Announcement(storeSetting.Announcement),
EnableDebug: storeSetting.EnableDebug,
diff --git a/backend/api/v1/workspace_service.go b/backend/api/v1/workspace_service.go
index 274bafb87f..bce6c8269c 100644
--- a/backend/api/v1/workspace_service.go
+++ b/backend/api/v1/workspace_service.go
@@ -11,6 +11,7 @@ import (
"github.com/bytebase/bytebase/backend/common"
"github.com/bytebase/bytebase/backend/component/config"
"github.com/bytebase/bytebase/backend/component/iam"
+ "github.com/bytebase/bytebase/backend/enterprise"
storepb "github.com/bytebase/bytebase/backend/generated-go/store"
v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
"github.com/bytebase/bytebase/backend/generated-go/v1/v1connect"
@@ -21,20 +22,91 @@ import (
// WorkspaceService implements the workspace service.
type WorkspaceService struct {
v1connect.UnimplementedWorkspaceServiceHandler
- store *store.Store
- iamManager *iam.Manager
- profile *config.Profile
+ store *store.Store
+ licenseService *enterprise.LicenseService
+ iamManager *iam.Manager
+ profile *config.Profile
}
// NewWorkspaceService creates a new WorkspaceService.
-func NewWorkspaceService(store *store.Store, iamManager *iam.Manager, profile *config.Profile) *WorkspaceService {
+func NewWorkspaceService(
+ store *store.Store,
+ iamManager *iam.Manager,
+ profile *config.Profile,
+ licenseService *enterprise.LicenseService,
+) *WorkspaceService {
return &WorkspaceService{
- store: store,
- iamManager: iamManager,
- profile: profile,
+ store: store,
+ iamManager: iamManager,
+ profile: profile,
+ licenseService: licenseService,
}
}
+// GetWorkspace gets a workspace by name.
+// Supports "workspaces/-" to resolve the current/default workspace.
+func (s *WorkspaceService) GetWorkspace(ctx context.Context, req *connect.Request[v1pb.GetWorkspaceRequest]) (*connect.Response[v1pb.Workspace], error) {
+ var workspaceID string
+
+ name := req.Msg.Name
+ if name == "workspaces/-" {
+ // "workspaces/-" is allowed without auth (login page logo).
+ // Resolve from context (authenticated) or fall back to default (self-hosted).
+ workspaceID = common.GetWorkspaceIDFromContext(ctx)
+ if workspaceID == "" && !s.profile.SaaS {
+ ws, err := s.store.GetWorkspaceID(ctx)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, err)
+ }
+ workspaceID = ws
+ }
+ } else {
+ var err error
+ workspaceID, err = common.GetWorkspaceID(name)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Wrap(err, "invalid workspace name"))
+ }
+
+ // Require authentication for non-saas mode.
+ if s.profile.SaaS {
+ // Specific workspace requires authentication and membership.
+ user, ok := GetUserFromContext(ctx)
+ if !ok || user == nil {
+ return nil, connect.NewError(connect.CodeUnauthenticated, errors.New("authentication required"))
+ }
+
+ // Verify the user is a member of the requested workspace.
+ ws, err := s.store.FindWorkspace(ctx, &store.FindWorkspaceMessage{
+ WorkspaceID: &workspaceID,
+ Email: user.Email,
+ IncludeAllUser: !s.profile.SaaS,
+ })
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to verify workspace membership"))
+ }
+ if ws == nil {
+ return nil, connect.NewError(connect.CodeUnauthenticated, errors.Errorf("failed to verify workspace membership"))
+ }
+ }
+ }
+
+ result := &v1pb.Workspace{}
+ if workspaceID != "" {
+ ws, err := s.store.GetWorkspaceByID(ctx, workspaceID)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to get workspace"))
+ }
+ if ws == nil {
+ return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("workspace %q not found", name))
+ }
+ result.Name = common.FormatWorkspace(ws.ResourceID)
+ result.Title = ws.Payload.GetTitle()
+ result.Logo = ws.Payload.GetLogo()
+ }
+
+ return connect.NewResponse(result), nil
+}
+
func (s *WorkspaceService) ListWorkspaces(ctx context.Context, _ *connect.Request[v1pb.ListWorkspacesRequest]) (*connect.Response[v1pb.ListWorkspacesResponse], error) {
user, ok := GetUserFromContext(ctx)
if !ok || user == nil {
@@ -53,7 +125,8 @@ func (s *WorkspaceService) ListWorkspaces(ctx context.Context, _ *connect.Reques
for _, ws := range workspaces {
result = append(result, &v1pb.Workspace{
Name: common.FormatWorkspace(ws.ResourceID),
- Title: ws.Name,
+ Title: ws.Payload.GetTitle(),
+ Logo: ws.Payload.GetLogo(),
})
}
return connect.NewResponse(&v1pb.ListWorkspacesResponse{Workspaces: result}), nil
@@ -71,8 +144,9 @@ func (s *WorkspaceService) UpdateWorkspace(ctx context.Context, req *connect.Req
return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("update_mask is required"))
}
+ workspaceID := common.GetWorkspaceIDFromContext(ctx)
patch := &store.UpdateWorkspaceMessage{
- ResourceID: common.GetWorkspaceIDFromContext(ctx),
+ ResourceID: workspaceID,
}
for _, path := range req.Msg.UpdateMask.GetPaths() {
switch path {
@@ -81,6 +155,11 @@ func (s *WorkspaceService) UpdateWorkspace(ctx context.Context, req *connect.Req
return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("title cannot be empty"))
}
patch.Title = &ws.Title
+ case "logo":
+ if err := s.licenseService.IsFeatureEnabled(ctx, workspaceID, v1pb.PlanFeature_FEATURE_CUSTOM_LOGO); err != nil {
+ return nil, connect.NewError(connect.CodePermissionDenied, err)
+ }
+ patch.Logo = &ws.Logo
default:
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("unsupported field: %q", path))
}
@@ -90,9 +169,15 @@ func (s *WorkspaceService) UpdateWorkspace(ctx context.Context, req *connect.Req
return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to update workspace"))
}
+ // Read back the updated workspace to return the full state.
+ updated, err := s.store.GetWorkspaceByID(ctx, patch.ResourceID)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to get updated workspace"))
+ }
return connect.NewResponse(&v1pb.Workspace{
Name: ws.Name,
- Title: ws.Title,
+ Title: updated.Payload.GetTitle(),
+ Logo: updated.Payload.GetLogo(),
}), nil
}
diff --git a/backend/generated-go/store/setting.pb.go b/backend/generated-go/store/setting.pb.go
index 8d0ce11d70..6793fa575b 100644
--- a/backend/generated-go/store/setting.pb.go
+++ b/backend/generated-go/store/setting.pb.go
@@ -437,8 +437,6 @@ type WorkspaceProfileSetting struct {
Watermark bool `protobuf:"varint,14,opt,name=watermark,proto3" json:"watermark,omitempty"`
// The token for directory sync authentication.
DirectorySyncToken string `protobuf:"bytes,15,opt,name=directory_sync_token,json=directorySyncToken,proto3" json:"directory_sync_token,omitempty"`
- // The branding logo as a data URI (e.g. data:image/png;base64,...).
- BrandingLogo string `protobuf:"bytes,16,opt,name=branding_logo,json=brandingLogo,proto3" json:"branding_logo,omitempty"`
// Password restriction settings.
PasswordRestriction *WorkspaceProfileSetting_PasswordRestriction `protobuf:"bytes,17,opt,name=password_restriction,json=passwordRestriction,proto3" json:"password_restriction,omitempty"`
// The duration for access token. Default is 1 hour.
@@ -589,13 +587,6 @@ func (x *WorkspaceProfileSetting) GetDirectorySyncToken() string {
return ""
}
-func (x *WorkspaceProfileSetting) GetBrandingLogo() string {
- if x != nil {
- return x.BrandingLogo
- }
- return ""
-}
-
func (x *WorkspaceProfileSetting) GetPasswordRestriction() *WorkspaceProfileSetting_PasswordRestriction {
if x != nil {
return x.PasswordRestriction
@@ -2381,7 +2372,7 @@ const file_store_setting_proto_rawDesc = "" +
"\n" +
"\x13store/setting.proto\x12\x0ebytebase.store\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x14store/approval.proto\x1a\x12store/common.proto\"P\n" +
"\rSystemSetting\x12\x18\n" +
- "\alicense\x18\x03 \x01(\tR\alicenseJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\vauth_secretR\fworkspace_id\"\xcf\x0f\n" +
+ "\alicense\x18\x03 \x01(\tR\alicenseJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\vauth_secretR\fworkspace_id\"\xb0\x0f\n" +
"\x17WorkspaceProfileSetting\x12!\n" +
"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +
"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +
@@ -2399,8 +2390,7 @@ const file_store_setting_proto_rawDesc = "" +
"\x18inactive_session_timeout\x18\f \x01(\v2\x19.google.protobuf.DurationR\x16inactiveSessionTimeout\x125\n" +
"\x17enable_audit_log_stdout\x18\r \x01(\bR\x14enableAuditLogStdout\x12\x1c\n" +
"\twatermark\x18\x0e \x01(\bR\twatermark\x120\n" +
- "\x14directory_sync_token\x18\x0f \x01(\tR\x12directorySyncToken\x12#\n" +
- "\rbranding_logo\x18\x10 \x01(\tR\fbrandingLogo\x12n\n" +
+ "\x14directory_sync_token\x18\x0f \x01(\tR\x12directorySyncToken\x12n\n" +
"\x14password_restriction\x18\x11 \x01(\v2;.bytebase.store.WorkspaceProfileSetting.PasswordRestrictionR\x13passwordRestriction\x12M\n" +
"\x15access_token_duration\x18\x12 \x01(\v2\x19.google.protobuf.DurationR\x13accessTokenDuration\x12!\n" +
"\fenable_debug\x18\x13 \x01(\bR\venableDebug\x12&\n" +
@@ -2429,7 +2419,7 @@ const file_store_setting_proto_rawDesc = "" +
" DATABASE_CHANGE_MODE_UNSPECIFIED\x10\x00\x12\f\n" +
"\bPIPELINE\x10\x01\x12\n" +
"\n" +
- "\x06EDITOR\x10\x02\"\xa9\x03\n" +
+ "\x06EDITOR\x10\x02J\x04\b\x10\x10\x11\"\xa9\x03\n" +
"\x18WorkspaceApprovalSetting\x12C\n" +
"\x05rules\x18\x01 \x03(\v2-.bytebase.store.WorkspaceApprovalSetting.RuleR\x05rules\x1a\xc7\x02\n" +
"\x04Rule\x12<\n" +
diff --git a/backend/generated-go/store/setting_equal.pb.go b/backend/generated-go/store/setting_equal.pb.go
index 5223e831d4..d44cea32d5 100644
--- a/backend/generated-go/store/setting_equal.pb.go
+++ b/backend/generated-go/store/setting_equal.pb.go
@@ -128,9 +128,6 @@ func (x *WorkspaceProfileSetting) Equal(y *WorkspaceProfileSetting) bool {
if x.DirectorySyncToken != y.DirectorySyncToken {
return false
}
- if x.BrandingLogo != y.BrandingLogo {
- return false
- }
if !x.PasswordRestriction.Equal(y.PasswordRestriction) {
return false
}
diff --git a/backend/generated-go/store/workspace.pb.go b/backend/generated-go/store/workspace.pb.go
new file mode 100644
index 0000000000..729d10cf2d
--- /dev/null
+++ b/backend/generated-go/store/workspace.pb.go
@@ -0,0 +1,133 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.11
+// protoc (unknown)
+// source: store/workspace.proto
+
+package store
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// WorkspacePayload stores workspace-level metadata.
+type WorkspacePayload struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
+ Logo string `protobuf:"bytes,2,opt,name=logo,proto3" json:"logo,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WorkspacePayload) Reset() {
+ *x = WorkspacePayload{}
+ mi := &file_store_workspace_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WorkspacePayload) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WorkspacePayload) ProtoMessage() {}
+
+func (x *WorkspacePayload) ProtoReflect() protoreflect.Message {
+ mi := &file_store_workspace_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WorkspacePayload.ProtoReflect.Descriptor instead.
+func (*WorkspacePayload) Descriptor() ([]byte, []int) {
+ return file_store_workspace_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *WorkspacePayload) GetTitle() string {
+ if x != nil {
+ return x.Title
+ }
+ return ""
+}
+
+func (x *WorkspacePayload) GetLogo() string {
+ if x != nil {
+ return x.Logo
+ }
+ return ""
+}
+
+var File_store_workspace_proto protoreflect.FileDescriptor
+
+const file_store_workspace_proto_rawDesc = "" +
+ "\n" +
+ "\x15store/workspace.proto\x12\x0ebytebase.store\"<\n" +
+ "\x10WorkspacePayload\x12\x14\n" +
+ "\x05title\x18\x01 \x01(\tR\x05title\x12\x12\n" +
+ "\x04logo\x18\x02 \x01(\tR\x04logoB\x91\x01\n" +
+ "\x12com.bytebase.storeB\x0eWorkspaceProtoP\x01Z\x12generated-go/store\xa2\x02\x03BSX\xaa\x02\x0eBytebase.Store\xca\x02\x0eBytebase\\Store\xe2\x02\x1aBytebase\\Store\\GPBMetadata\xea\x02\x0fBytebase::Storeb\x06proto3"
+
+var (
+ file_store_workspace_proto_rawDescOnce sync.Once
+ file_store_workspace_proto_rawDescData []byte
+)
+
+func file_store_workspace_proto_rawDescGZIP() []byte {
+ file_store_workspace_proto_rawDescOnce.Do(func() {
+ file_store_workspace_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_store_workspace_proto_rawDesc), len(file_store_workspace_proto_rawDesc)))
+ })
+ return file_store_workspace_proto_rawDescData
+}
+
+var file_store_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_store_workspace_proto_goTypes = []any{
+ (*WorkspacePayload)(nil), // 0: bytebase.store.WorkspacePayload
+}
+var file_store_workspace_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_store_workspace_proto_init() }
+func file_store_workspace_proto_init() {
+ if File_store_workspace_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_workspace_proto_rawDesc), len(file_store_workspace_proto_rawDesc)),
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_store_workspace_proto_goTypes,
+ DependencyIndexes: file_store_workspace_proto_depIdxs,
+ MessageInfos: file_store_workspace_proto_msgTypes,
+ }.Build()
+ File_store_workspace_proto = out.File
+ file_store_workspace_proto_goTypes = nil
+ file_store_workspace_proto_depIdxs = nil
+}
diff --git a/backend/generated-go/store/workspace_equal.pb.go b/backend/generated-go/store/workspace_equal.pb.go
new file mode 100644
index 0000000000..596dc10caf
--- /dev/null
+++ b/backend/generated-go/store/workspace_equal.pb.go
@@ -0,0 +1,20 @@
+// Code generated by protoc-gen-equal-go. DO NOT EDIT.
+// source: store/workspace.proto
+
+package store
+
+func (x *WorkspacePayload) Equal(y *WorkspacePayload) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.Title != y.Title {
+ return false
+ }
+ if x.Logo != y.Logo {
+ return false
+ }
+ return true
+}
diff --git a/backend/generated-go/v1/actuator_service.pb.go b/backend/generated-go/v1/actuator_service.pb.go
index 7f0859b2cc..0178089548 100644
--- a/backend/generated-go/v1/actuator_service.pb.go
+++ b/backend/generated-go/v1/actuator_service.pb.go
@@ -24,99 +24,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
-// Request message for getting branding resources.
-type GetResourcePackageRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // Optional workspace name, format: workspaces/{workspace}.
- // Set when using the workspace-scoped URL pattern.
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *GetResourcePackageRequest) Reset() {
- *x = GetResourcePackageRequest{}
- mi := &file_v1_actuator_service_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *GetResourcePackageRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetResourcePackageRequest) ProtoMessage() {}
-
-func (x *GetResourcePackageRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_actuator_service_proto_msgTypes[0]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetResourcePackageRequest.ProtoReflect.Descriptor instead.
-func (*GetResourcePackageRequest) Descriptor() ([]byte, []int) {
- return file_v1_actuator_service_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *GetResourcePackageRequest) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-// Custom branding resources for the Bytebase instance.
-type ResourcePackage struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // The branding logo.
- Logo []byte `protobuf:"bytes,1,opt,name=logo,proto3" json:"logo,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *ResourcePackage) Reset() {
- *x = ResourcePackage{}
- mi := &file_v1_actuator_service_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *ResourcePackage) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*ResourcePackage) ProtoMessage() {}
-
-func (x *ResourcePackage) ProtoReflect() protoreflect.Message {
- mi := &file_v1_actuator_service_proto_msgTypes[1]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use ResourcePackage.ProtoReflect.Descriptor instead.
-func (*ResourcePackage) Descriptor() ([]byte, []int) {
- return file_v1_actuator_service_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *ResourcePackage) GetLogo() []byte {
- if x != nil {
- return x.Logo
- }
- return nil
-}
-
// Request message for setting up sample data.
type SetupSampleRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -126,7 +33,7 @@ type SetupSampleRequest struct {
func (x *SetupSampleRequest) Reset() {
*x = SetupSampleRequest{}
- mi := &file_v1_actuator_service_proto_msgTypes[2]
+ mi := &file_v1_actuator_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -138,7 +45,7 @@ func (x *SetupSampleRequest) String() string {
func (*SetupSampleRequest) ProtoMessage() {}
func (x *SetupSampleRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_actuator_service_proto_msgTypes[2]
+ mi := &file_v1_actuator_service_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -151,7 +58,7 @@ func (x *SetupSampleRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SetupSampleRequest.ProtoReflect.Descriptor instead.
func (*SetupSampleRequest) Descriptor() ([]byte, []int) {
- return file_v1_actuator_service_proto_rawDescGZIP(), []int{2}
+ return file_v1_actuator_service_proto_rawDescGZIP(), []int{0}
}
// Request message for getting actuator information.
@@ -163,7 +70,7 @@ type GetActuatorInfoRequest struct {
func (x *GetActuatorInfoRequest) Reset() {
*x = GetActuatorInfoRequest{}
- mi := &file_v1_actuator_service_proto_msgTypes[3]
+ mi := &file_v1_actuator_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -175,7 +82,7 @@ func (x *GetActuatorInfoRequest) String() string {
func (*GetActuatorInfoRequest) ProtoMessage() {}
func (x *GetActuatorInfoRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_actuator_service_proto_msgTypes[3]
+ mi := &file_v1_actuator_service_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -188,7 +95,7 @@ func (x *GetActuatorInfoRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetActuatorInfoRequest.ProtoReflect.Descriptor instead.
func (*GetActuatorInfoRequest) Descriptor() ([]byte, []int) {
- return file_v1_actuator_service_proto_rawDescGZIP(), []int{3}
+ return file_v1_actuator_service_proto_rawDescGZIP(), []int{1}
}
// Request message for getting workspace-scoped actuator information.
@@ -202,7 +109,7 @@ type GetWorkspaceActuatorInfoRequest struct {
func (x *GetWorkspaceActuatorInfoRequest) Reset() {
*x = GetWorkspaceActuatorInfoRequest{}
- mi := &file_v1_actuator_service_proto_msgTypes[4]
+ mi := &file_v1_actuator_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -214,7 +121,7 @@ func (x *GetWorkspaceActuatorInfoRequest) String() string {
func (*GetWorkspaceActuatorInfoRequest) ProtoMessage() {}
func (x *GetWorkspaceActuatorInfoRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_actuator_service_proto_msgTypes[4]
+ mi := &file_v1_actuator_service_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -227,7 +134,7 @@ func (x *GetWorkspaceActuatorInfoRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetWorkspaceActuatorInfoRequest.ProtoReflect.Descriptor instead.
func (*GetWorkspaceActuatorInfoRequest) Descriptor() ([]byte, []int) {
- return file_v1_actuator_service_proto_rawDescGZIP(), []int{4}
+ return file_v1_actuator_service_proto_rawDescGZIP(), []int{2}
}
func (x *GetWorkspaceActuatorInfoRequest) GetName() string {
@@ -246,7 +153,7 @@ type DeleteCacheRequest struct {
func (x *DeleteCacheRequest) Reset() {
*x = DeleteCacheRequest{}
- mi := &file_v1_actuator_service_proto_msgTypes[5]
+ mi := &file_v1_actuator_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -258,7 +165,7 @@ func (x *DeleteCacheRequest) String() string {
func (*DeleteCacheRequest) ProtoMessage() {}
func (x *DeleteCacheRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_actuator_service_proto_msgTypes[5]
+ mi := &file_v1_actuator_service_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -271,7 +178,7 @@ func (x *DeleteCacheRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteCacheRequest.ProtoReflect.Descriptor instead.
func (*DeleteCacheRequest) Descriptor() ([]byte, []int) {
- return file_v1_actuator_service_proto_rawDescGZIP(), []int{5}
+ return file_v1_actuator_service_proto_rawDescGZIP(), []int{3}
}
type Restriction struct {
@@ -288,7 +195,7 @@ type Restriction struct {
func (x *Restriction) Reset() {
*x = Restriction{}
- mi := &file_v1_actuator_service_proto_msgTypes[6]
+ mi := &file_v1_actuator_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -300,7 +207,7 @@ func (x *Restriction) String() string {
func (*Restriction) ProtoMessage() {}
func (x *Restriction) ProtoReflect() protoreflect.Message {
- mi := &file_v1_actuator_service_proto_msgTypes[6]
+ mi := &file_v1_actuator_service_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -313,7 +220,7 @@ func (x *Restriction) ProtoReflect() protoreflect.Message {
// Deprecated: Use Restriction.ProtoReflect.Descriptor instead.
func (*Restriction) Descriptor() ([]byte, []int) {
- return file_v1_actuator_service_proto_rawDescGZIP(), []int{6}
+ return file_v1_actuator_service_proto_rawDescGZIP(), []int{4}
}
func (x *Restriction) GetDisallowSignup() bool {
@@ -388,7 +295,7 @@ type ActuatorInfo struct {
func (x *ActuatorInfo) Reset() {
*x = ActuatorInfo{}
- mi := &file_v1_actuator_service_proto_msgTypes[7]
+ mi := &file_v1_actuator_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -400,7 +307,7 @@ func (x *ActuatorInfo) String() string {
func (*ActuatorInfo) ProtoMessage() {}
func (x *ActuatorInfo) ProtoReflect() protoreflect.Message {
- mi := &file_v1_actuator_service_proto_msgTypes[7]
+ mi := &file_v1_actuator_service_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -413,7 +320,7 @@ func (x *ActuatorInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use ActuatorInfo.ProtoReflect.Descriptor instead.
func (*ActuatorInfo) Descriptor() ([]byte, []int) {
- return file_v1_actuator_service_proto_rawDescGZIP(), []int{7}
+ return file_v1_actuator_service_proto_rawDescGZIP(), []int{5}
}
func (x *ActuatorInfo) GetVersion() string {
@@ -560,11 +467,7 @@ var File_v1_actuator_service_proto protoreflect.FileDescriptor
const file_v1_actuator_service_proto_rawDesc = "" +
"\n" +
- "\x19v1/actuator_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x18v1/setting_service.proto\"/\n" +
- "\x19GetResourcePackageRequest\x12\x12\n" +
- "\x04name\x18\x01 \x01(\tR\x04name\"%\n" +
- "\x0fResourcePackage\x12\x12\n" +
- "\x04logo\x18\x01 \x01(\fR\x04logo\"\x14\n" +
+ "\x19v1/actuator_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x18v1/setting_service.proto\"\x14\n" +
"\x12SetupSampleRequest\"\x18\n" +
"\x16GetActuatorInfoRequest\"U\n" +
"\x1fGetWorkspaceActuatorInfoRequest\x122\n" +
@@ -598,12 +501,11 @@ const file_v1_actuator_service_proto_rawDesc = "" +
"\vrestriction\x18\x19 \x01(\v2\x18.bytebase.v1.RestrictionB\x03\xe0A\x03R\vrestriction\x12,\n" +
"\x0fdefault_project\x18\x1a \x01(\tB\x03\xe0A\x03R\x0edefaultProjectJ\x04\b\t\x10\n" +
"J\x04\b\n" +
- "\x10\vJ\x04\b\f\x10\rJ\x04\b\x10\x10\x11J\x04\b\x11\x10\x12J\x04\b\x0e\x10\x0f2\xe8\x05\n" +
+ "\x10\vJ\x04\b\f\x10\rJ\x04\b\x10\x10\x11J\x04\b\x11\x10\x12J\x04\b\x0e\x10\x0f2\xb6\x04\n" +
"\x0fActuatorService\x12s\n" +
"\x0fGetActuatorInfo\x12#.bytebase.v1.GetActuatorInfoRequest\x1a\x19.bytebase.v1.ActuatorInfo\" \xdaA\x00\x80\xea0\x01\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/actuator/info\x12\x82\x01\n" +
"\vSetupSample\x12\x1f.bytebase.v1.SetupSampleRequest\x1a\x16.google.protobuf.Empty\":\x8a\xea0\x12bb.projects.create\x90\xea0\x01\x82\xd3\xe4\x93\x02\x1a\"\x18/v1/actuator:setupSample\x12f\n" +
- "\vDeleteCache\x12\x1f.bytebase.v1.DeleteCacheRequest\x1a\x16.google.protobuf.Empty\"\x1e\x80\xea0\x01\x82\xd3\xe4\x93\x02\x14*\x12/v1/actuator/cache\x12\xaf\x01\n" +
- "\x12GetResourcePackage\x12&.bytebase.v1.GetResourcePackageRequest\x1a\x1c.bytebase.v1.ResourcePackage\"S\xdaA\x00\x80\xea0\x01\x82\xd3\xe4\x93\x02FZ,\x12*/v1/{name=workspaces/*}/actuator/resources\x12\x16/v1/actuator/resources\x12\xc0\x01\n" +
+ "\vDeleteCache\x12\x1f.bytebase.v1.DeleteCacheRequest\x1a\x16.google.protobuf.Empty\"\x1e\x80\xea0\x01\x82\xd3\xe4\x93\x02\x14*\x12/v1/actuator/cache\x12\xc0\x01\n" +
"\x18GetWorkspaceActuatorInfo\x12,.bytebase.v1.GetWorkspaceActuatorInfoRequest\x1a\x19.bytebase.v1.ActuatorInfo\"[\xdaA\x04name\x8a\xea0\x1fbb.settings.getWorkspaceProfile\x90\xea0\x01\x82\xd3\xe4\x93\x02'\x12%/v1/{name=workspaces/*}/actuator/infoB\xaa\x01\n" +
"\x0fcom.bytebase.v1B\x14ActuatorServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"
@@ -619,39 +521,35 @@ func file_v1_actuator_service_proto_rawDescGZIP() []byte {
return file_v1_actuator_service_proto_rawDescData
}
-var file_v1_actuator_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
+var file_v1_actuator_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_v1_actuator_service_proto_goTypes = []any{
- (*GetResourcePackageRequest)(nil), // 0: bytebase.v1.GetResourcePackageRequest
- (*ResourcePackage)(nil), // 1: bytebase.v1.ResourcePackage
- (*SetupSampleRequest)(nil), // 2: bytebase.v1.SetupSampleRequest
- (*GetActuatorInfoRequest)(nil), // 3: bytebase.v1.GetActuatorInfoRequest
- (*GetWorkspaceActuatorInfoRequest)(nil), // 4: bytebase.v1.GetWorkspaceActuatorInfoRequest
- (*DeleteCacheRequest)(nil), // 5: bytebase.v1.DeleteCacheRequest
- (*Restriction)(nil), // 6: bytebase.v1.Restriction
- (*ActuatorInfo)(nil), // 7: bytebase.v1.ActuatorInfo
- (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 8: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction
- (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp
- (*emptypb.Empty)(nil), // 10: google.protobuf.Empty
+ (*SetupSampleRequest)(nil), // 0: bytebase.v1.SetupSampleRequest
+ (*GetActuatorInfoRequest)(nil), // 1: bytebase.v1.GetActuatorInfoRequest
+ (*GetWorkspaceActuatorInfoRequest)(nil), // 2: bytebase.v1.GetWorkspaceActuatorInfoRequest
+ (*DeleteCacheRequest)(nil), // 3: bytebase.v1.DeleteCacheRequest
+ (*Restriction)(nil), // 4: bytebase.v1.Restriction
+ (*ActuatorInfo)(nil), // 5: bytebase.v1.ActuatorInfo
+ (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 6: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction
+ (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
+ (*emptypb.Empty)(nil), // 8: google.protobuf.Empty
}
var file_v1_actuator_service_proto_depIdxs = []int32{
- 8, // 0: bytebase.v1.Restriction.password_restriction:type_name -> bytebase.v1.WorkspaceProfileSetting.PasswordRestriction
- 9, // 1: bytebase.v1.ActuatorInfo.last_active_time:type_name -> google.protobuf.Timestamp
- 6, // 2: bytebase.v1.ActuatorInfo.restriction:type_name -> bytebase.v1.Restriction
- 3, // 3: bytebase.v1.ActuatorService.GetActuatorInfo:input_type -> bytebase.v1.GetActuatorInfoRequest
- 2, // 4: bytebase.v1.ActuatorService.SetupSample:input_type -> bytebase.v1.SetupSampleRequest
- 5, // 5: bytebase.v1.ActuatorService.DeleteCache:input_type -> bytebase.v1.DeleteCacheRequest
- 0, // 6: bytebase.v1.ActuatorService.GetResourcePackage:input_type -> bytebase.v1.GetResourcePackageRequest
- 4, // 7: bytebase.v1.ActuatorService.GetWorkspaceActuatorInfo:input_type -> bytebase.v1.GetWorkspaceActuatorInfoRequest
- 7, // 8: bytebase.v1.ActuatorService.GetActuatorInfo:output_type -> bytebase.v1.ActuatorInfo
- 10, // 9: bytebase.v1.ActuatorService.SetupSample:output_type -> google.protobuf.Empty
- 10, // 10: bytebase.v1.ActuatorService.DeleteCache:output_type -> google.protobuf.Empty
- 1, // 11: bytebase.v1.ActuatorService.GetResourcePackage:output_type -> bytebase.v1.ResourcePackage
- 7, // 12: bytebase.v1.ActuatorService.GetWorkspaceActuatorInfo:output_type -> bytebase.v1.ActuatorInfo
- 8, // [8:13] is the sub-list for method output_type
- 3, // [3:8] is the sub-list for method input_type
- 3, // [3:3] is the sub-list for extension type_name
- 3, // [3:3] is the sub-list for extension extendee
- 0, // [0:3] is the sub-list for field type_name
+ 6, // 0: bytebase.v1.Restriction.password_restriction:type_name -> bytebase.v1.WorkspaceProfileSetting.PasswordRestriction
+ 7, // 1: bytebase.v1.ActuatorInfo.last_active_time:type_name -> google.protobuf.Timestamp
+ 4, // 2: bytebase.v1.ActuatorInfo.restriction:type_name -> bytebase.v1.Restriction
+ 1, // 3: bytebase.v1.ActuatorService.GetActuatorInfo:input_type -> bytebase.v1.GetActuatorInfoRequest
+ 0, // 4: bytebase.v1.ActuatorService.SetupSample:input_type -> bytebase.v1.SetupSampleRequest
+ 3, // 5: bytebase.v1.ActuatorService.DeleteCache:input_type -> bytebase.v1.DeleteCacheRequest
+ 2, // 6: bytebase.v1.ActuatorService.GetWorkspaceActuatorInfo:input_type -> bytebase.v1.GetWorkspaceActuatorInfoRequest
+ 5, // 7: bytebase.v1.ActuatorService.GetActuatorInfo:output_type -> bytebase.v1.ActuatorInfo
+ 8, // 8: bytebase.v1.ActuatorService.SetupSample:output_type -> google.protobuf.Empty
+ 8, // 9: bytebase.v1.ActuatorService.DeleteCache:output_type -> google.protobuf.Empty
+ 5, // 10: bytebase.v1.ActuatorService.GetWorkspaceActuatorInfo:output_type -> bytebase.v1.ActuatorInfo
+ 7, // [7:11] is the sub-list for method output_type
+ 3, // [3:7] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
}
func init() { file_v1_actuator_service_proto_init() }
@@ -667,7 +565,7 @@ func file_v1_actuator_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_actuator_service_proto_rawDesc), len(file_v1_actuator_service_proto_rawDesc)),
NumEnums: 0,
- NumMessages: 8,
+ NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/backend/generated-go/v1/actuator_service.pb.gw.go b/backend/generated-go/v1/actuator_service.pb.gw.go
index 6386786504..093416c909 100644
--- a/backend/generated-go/v1/actuator_service.pb.gw.go
+++ b/backend/generated-go/v1/actuator_service.pb.gw.go
@@ -98,80 +98,6 @@ func local_request_ActuatorService_DeleteCache_0(ctx context.Context, marshaler
return msg, metadata, err
}
-var filter_ActuatorService_GetResourcePackage_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
-
-func request_ActuatorService_GetResourcePackage_0(ctx context.Context, marshaler runtime.Marshaler, client ActuatorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq GetResourcePackageRequest
- metadata runtime.ServerMetadata
- )
- if req.Body != nil {
- _, _ = io.Copy(io.Discard, req.Body)
- }
- if err := req.ParseForm(); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ActuatorService_GetResourcePackage_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- msg, err := client.GetResourcePackage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-}
-
-func local_request_ActuatorService_GetResourcePackage_0(ctx context.Context, marshaler runtime.Marshaler, server ActuatorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq GetResourcePackageRequest
- metadata runtime.ServerMetadata
- )
- if err := req.ParseForm(); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ActuatorService_GetResourcePackage_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- msg, err := server.GetResourcePackage(ctx, &protoReq)
- return msg, metadata, err
-}
-
-func request_ActuatorService_GetResourcePackage_1(ctx context.Context, marshaler runtime.Marshaler, client ActuatorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq GetResourcePackageRequest
- metadata runtime.ServerMetadata
- err error
- )
- if req.Body != nil {
- _, _ = io.Copy(io.Discard, req.Body)
- }
- val, ok := pathParams["name"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
- }
- protoReq.Name, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
- }
- msg, err := client.GetResourcePackage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-}
-
-func local_request_ActuatorService_GetResourcePackage_1(ctx context.Context, marshaler runtime.Marshaler, server ActuatorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq GetResourcePackageRequest
- metadata runtime.ServerMetadata
- err error
- )
- val, ok := pathParams["name"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
- }
- protoReq.Name, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
- }
- msg, err := server.GetResourcePackage(ctx, &protoReq)
- return msg, metadata, err
-}
-
func request_ActuatorService_GetWorkspaceActuatorInfo_0(ctx context.Context, marshaler runtime.Marshaler, client ActuatorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq GetWorkspaceActuatorInfoRequest
@@ -277,46 +203,6 @@ func RegisterActuatorServiceHandlerServer(ctx context.Context, mux *runtime.Serv
}
forward_ActuatorService_DeleteCache_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle(http.MethodGet, pattern_ActuatorService_GetResourcePackage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ActuatorService/GetResourcePackage", runtime.WithHTTPPathPattern("/v1/actuator/resources"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_ActuatorService_GetResourcePackage_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_ActuatorService_GetResourcePackage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
- mux.Handle(http.MethodGet, pattern_ActuatorService_GetResourcePackage_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.ActuatorService/GetResourcePackage", runtime.WithHTTPPathPattern("/v1/{name=workspaces/*}/actuator/resources"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_ActuatorService_GetResourcePackage_1(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_ActuatorService_GetResourcePackage_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
mux.Handle(http.MethodGet, pattern_ActuatorService_GetWorkspaceActuatorInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -428,40 +314,6 @@ func RegisterActuatorServiceHandlerClient(ctx context.Context, mux *runtime.Serv
}
forward_ActuatorService_DeleteCache_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle(http.MethodGet, pattern_ActuatorService_GetResourcePackage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ActuatorService/GetResourcePackage", runtime.WithHTTPPathPattern("/v1/actuator/resources"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_ActuatorService_GetResourcePackage_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_ActuatorService_GetResourcePackage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
- mux.Handle(http.MethodGet, pattern_ActuatorService_GetResourcePackage_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.ActuatorService/GetResourcePackage", runtime.WithHTTPPathPattern("/v1/{name=workspaces/*}/actuator/resources"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_ActuatorService_GetResourcePackage_1(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
- forward_ActuatorService_GetResourcePackage_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
mux.Handle(http.MethodGet, pattern_ActuatorService_GetWorkspaceActuatorInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -486,8 +338,6 @@ var (
pattern_ActuatorService_GetActuatorInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "actuator", "info"}, ""))
pattern_ActuatorService_SetupSample_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "actuator"}, "setupSample"))
pattern_ActuatorService_DeleteCache_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "actuator", "cache"}, ""))
- pattern_ActuatorService_GetResourcePackage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "actuator", "resources"}, ""))
- pattern_ActuatorService_GetResourcePackage_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3, 2, 4}, []string{"v1", "workspaces", "name", "actuator", "resources"}, ""))
pattern_ActuatorService_GetWorkspaceActuatorInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3, 2, 4}, []string{"v1", "workspaces", "name", "actuator", "info"}, ""))
)
@@ -495,7 +345,5 @@ var (
forward_ActuatorService_GetActuatorInfo_0 = runtime.ForwardResponseMessage
forward_ActuatorService_SetupSample_0 = runtime.ForwardResponseMessage
forward_ActuatorService_DeleteCache_0 = runtime.ForwardResponseMessage
- forward_ActuatorService_GetResourcePackage_0 = runtime.ForwardResponseMessage
- forward_ActuatorService_GetResourcePackage_1 = runtime.ForwardResponseMessage
forward_ActuatorService_GetWorkspaceActuatorInfo_0 = runtime.ForwardResponseMessage
)
diff --git a/backend/generated-go/v1/actuator_service_equal.pb.go b/backend/generated-go/v1/actuator_service_equal.pb.go
index 0ee8c8997c..901d53ba02 100644
--- a/backend/generated-go/v1/actuator_service_equal.pb.go
+++ b/backend/generated-go/v1/actuator_service_equal.pb.go
@@ -3,32 +3,6 @@
package v1
-func (x *GetResourcePackageRequest) Equal(y *GetResourcePackageRequest) bool {
- if x == y {
- return true
- }
- if x == nil || y == nil {
- return x == nil && y == nil
- }
- if x.Name != y.Name {
- return false
- }
- return true
-}
-
-func (x *ResourcePackage) Equal(y *ResourcePackage) bool {
- if x == y {
- return true
- }
- if x == nil || y == nil {
- return x == nil && y == nil
- }
- if string(x.Logo) != string(y.Logo) {
- return false
- }
- return true
-}
-
func (x *SetupSampleRequest) Equal(y *SetupSampleRequest) bool {
if x == y {
return true
diff --git a/backend/generated-go/v1/actuator_service_grpc.pb.go b/backend/generated-go/v1/actuator_service_grpc.pb.go
index b032ec617e..5ae57c782c 100644
--- a/backend/generated-go/v1/actuator_service_grpc.pb.go
+++ b/backend/generated-go/v1/actuator_service_grpc.pb.go
@@ -23,7 +23,6 @@ const (
ActuatorService_GetActuatorInfo_FullMethodName = "/bytebase.v1.ActuatorService/GetActuatorInfo"
ActuatorService_SetupSample_FullMethodName = "/bytebase.v1.ActuatorService/SetupSample"
ActuatorService_DeleteCache_FullMethodName = "/bytebase.v1.ActuatorService/DeleteCache"
- ActuatorService_GetResourcePackage_FullMethodName = "/bytebase.v1.ActuatorService/GetResourcePackage"
ActuatorService_GetWorkspaceActuatorInfo_FullMethodName = "/bytebase.v1.ActuatorService/GetWorkspaceActuatorInfo"
)
@@ -42,9 +41,6 @@ type ActuatorServiceClient interface {
// Clears the system cache to force data refresh.
// Permissions required: None
DeleteCache(ctx context.Context, in *DeleteCacheRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
- // Gets custom branding resources such as logos.
- // Permissions required: None
- GetResourcePackage(ctx context.Context, in *GetResourcePackageRequest, opts ...grpc.CallOption) (*ResourcePackage, error)
// Gets workspace-scoped actuator info. Requires authentication.
GetWorkspaceActuatorInfo(ctx context.Context, in *GetWorkspaceActuatorInfoRequest, opts ...grpc.CallOption) (*ActuatorInfo, error)
}
@@ -87,16 +83,6 @@ func (c *actuatorServiceClient) DeleteCache(ctx context.Context, in *DeleteCache
return out, nil
}
-func (c *actuatorServiceClient) GetResourcePackage(ctx context.Context, in *GetResourcePackageRequest, opts ...grpc.CallOption) (*ResourcePackage, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(ResourcePackage)
- err := c.cc.Invoke(ctx, ActuatorService_GetResourcePackage_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
func (c *actuatorServiceClient) GetWorkspaceActuatorInfo(ctx context.Context, in *GetWorkspaceActuatorInfoRequest, opts ...grpc.CallOption) (*ActuatorInfo, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ActuatorInfo)
@@ -122,9 +108,6 @@ type ActuatorServiceServer interface {
// Clears the system cache to force data refresh.
// Permissions required: None
DeleteCache(context.Context, *DeleteCacheRequest) (*emptypb.Empty, error)
- // Gets custom branding resources such as logos.
- // Permissions required: None
- GetResourcePackage(context.Context, *GetResourcePackageRequest) (*ResourcePackage, error)
// Gets workspace-scoped actuator info. Requires authentication.
GetWorkspaceActuatorInfo(context.Context, *GetWorkspaceActuatorInfoRequest) (*ActuatorInfo, error)
mustEmbedUnimplementedActuatorServiceServer()
@@ -146,9 +129,6 @@ func (UnimplementedActuatorServiceServer) SetupSample(context.Context, *SetupSam
func (UnimplementedActuatorServiceServer) DeleteCache(context.Context, *DeleteCacheRequest) (*emptypb.Empty, error) {
return nil, status.Error(codes.Unimplemented, "method DeleteCache not implemented")
}
-func (UnimplementedActuatorServiceServer) GetResourcePackage(context.Context, *GetResourcePackageRequest) (*ResourcePackage, error) {
- return nil, status.Error(codes.Unimplemented, "method GetResourcePackage not implemented")
-}
func (UnimplementedActuatorServiceServer) GetWorkspaceActuatorInfo(context.Context, *GetWorkspaceActuatorInfoRequest) (*ActuatorInfo, error) {
return nil, status.Error(codes.Unimplemented, "method GetWorkspaceActuatorInfo not implemented")
}
@@ -227,24 +207,6 @@ func _ActuatorService_DeleteCache_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
-func _ActuatorService_GetResourcePackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetResourcePackageRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(ActuatorServiceServer).GetResourcePackage(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: ActuatorService_GetResourcePackage_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(ActuatorServiceServer).GetResourcePackage(ctx, req.(*GetResourcePackageRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
func _ActuatorService_GetWorkspaceActuatorInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkspaceActuatorInfoRequest)
if err := dec(in); err != nil {
@@ -282,10 +244,6 @@ var ActuatorService_ServiceDesc = grpc.ServiceDesc{
MethodName: "DeleteCache",
Handler: _ActuatorService_DeleteCache_Handler,
},
- {
- MethodName: "GetResourcePackage",
- Handler: _ActuatorService_GetResourcePackage_Handler,
- },
{
MethodName: "GetWorkspaceActuatorInfo",
Handler: _ActuatorService_GetWorkspaceActuatorInfo_Handler,
diff --git a/backend/generated-go/v1/setting_service.pb.go b/backend/generated-go/v1/setting_service.pb.go
index b88faeaed2..7c027e2254 100644
--- a/backend/generated-go/v1/setting_service.pb.go
+++ b/backend/generated-go/v1/setting_service.pb.go
@@ -898,8 +898,6 @@ type WorkspaceProfileSetting struct {
Watermark bool `protobuf:"varint,14,opt,name=watermark,proto3" json:"watermark,omitempty"`
// The token for directory sync authentication.
DirectorySyncToken string `protobuf:"bytes,15,opt,name=directory_sync_token,json=directorySyncToken,proto3" json:"directory_sync_token,omitempty"`
- // The branding logo as a data URI (e.g. data:image/png;base64,...).
- BrandingLogo string `protobuf:"bytes,16,opt,name=branding_logo,json=brandingLogo,proto3" json:"branding_logo,omitempty"`
// Password restriction settings.
PasswordRestriction *WorkspaceProfileSetting_PasswordRestriction `protobuf:"bytes,17,opt,name=password_restriction,json=passwordRestriction,proto3" json:"password_restriction,omitempty"`
// The duration for access token. Default is 1 hour.
@@ -1050,13 +1048,6 @@ func (x *WorkspaceProfileSetting) GetDirectorySyncToken() string {
return ""
}
-func (x *WorkspaceProfileSetting) GetBrandingLogo() string {
- if x != nil {
- return x.BrandingLogo
- }
- return ""
-}
-
func (x *WorkspaceProfileSetting) GetPasswordRestriction() *WorkspaceProfileSetting_PasswordRestriction {
if x != nil {
return x.PasswordRestriction
@@ -2897,7 +2888,7 @@ const file_v1_setting_service_proto_rawDesc = "" +
"\x04lark\x18\x05 \x01(\v2\x1e.bytebase.v1.AppIMSetting.LarkH\x00R\x04lark\x12@\n" +
"\bdingtalk\x18\x06 \x01(\v2\".bytebase.v1.AppIMSetting.DingTalkH\x00R\bdingtalk\x127\n" +
"\x05teams\x18\a \x01(\v2\x1f.bytebase.v1.AppIMSetting.TeamsH\x00R\x05teamsB\t\n" +
- "\apayload\"\xe0\f\n" +
+ "\apayload\"\xc1\f\n" +
"\x17WorkspaceProfileSetting\x12!\n" +
"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +
"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +
@@ -2915,8 +2906,7 @@ const file_v1_setting_service_proto_rawDesc = "" +
"\x18inactive_session_timeout\x18\f \x01(\v2\x19.google.protobuf.DurationR\x16inactiveSessionTimeout\x125\n" +
"\x17enable_audit_log_stdout\x18\r \x01(\bR\x14enableAuditLogStdout\x12\x1c\n" +
"\twatermark\x18\x0e \x01(\bR\twatermark\x120\n" +
- "\x14directory_sync_token\x18\x0f \x01(\tR\x12directorySyncToken\x12#\n" +
- "\rbranding_logo\x18\x10 \x01(\tR\fbrandingLogo\x12k\n" +
+ "\x14directory_sync_token\x18\x0f \x01(\tR\x12directorySyncToken\x12k\n" +
"\x14password_restriction\x18\x11 \x01(\v28.bytebase.v1.WorkspaceProfileSetting.PasswordRestrictionR\x13passwordRestriction\x12M\n" +
"\x15access_token_duration\x18\x12 \x01(\v2\x19.google.protobuf.DurationR\x13accessTokenDuration\x12!\n" +
"\fenable_debug\x18\x13 \x01(\bR\venableDebug\x12&\n" +
@@ -2930,7 +2920,7 @@ const file_v1_setting_service_proto_rawDesc = "" +
"\x18require_uppercase_letter\x18\x04 \x01(\bR\x16requireUppercaseLetter\x12:\n" +
"\x19require_special_character\x18\x05 \x01(\bR\x17requireSpecialCharacter\x12Q\n" +
"&require_reset_password_for_first_login\x18\x06 \x01(\bR!requireResetPasswordForFirstLogin\x12F\n" +
- "\x11password_rotation\x18\a \x01(\v2\x19.google.protobuf.DurationR\x10passwordRotation\"\xc2\x01\n" +
+ "\x11password_rotation\x18\a \x01(\v2\x19.google.protobuf.DurationR\x10passwordRotationJ\x04\b\x10\x10\x11\"\xc2\x01\n" +
"\fAnnouncement\x12:\n" +
"\x05level\x18\x01 \x01(\x0e2$.bytebase.v1.Announcement.AlertLevelR\x05level\x12\x12\n" +
"\x04text\x18\x02 \x01(\tR\x04text\x12\x12\n" +
diff --git a/backend/generated-go/v1/setting_service_equal.pb.go b/backend/generated-go/v1/setting_service_equal.pb.go
index dcba9b40ba..4519bfa4ec 100644
--- a/backend/generated-go/v1/setting_service_equal.pb.go
+++ b/backend/generated-go/v1/setting_service_equal.pb.go
@@ -375,9 +375,6 @@ func (x *WorkspaceProfileSetting) Equal(y *WorkspaceProfileSetting) bool {
if x.DirectorySyncToken != y.DirectorySyncToken {
return false
}
- if x.BrandingLogo != y.BrandingLogo {
- return false
- }
if !x.PasswordRestriction.Equal(y.PasswordRestriction) {
return false
}
diff --git a/backend/generated-go/v1/v1connect/actuator_service.connect.go b/backend/generated-go/v1/v1connect/actuator_service.connect.go
index 57e38dfe28..5a062a233a 100644
--- a/backend/generated-go/v1/v1connect/actuator_service.connect.go
+++ b/backend/generated-go/v1/v1connect/actuator_service.connect.go
@@ -43,9 +43,6 @@ const (
// ActuatorServiceDeleteCacheProcedure is the fully-qualified name of the ActuatorService's
// DeleteCache RPC.
ActuatorServiceDeleteCacheProcedure = "/bytebase.v1.ActuatorService/DeleteCache"
- // ActuatorServiceGetResourcePackageProcedure is the fully-qualified name of the ActuatorService's
- // GetResourcePackage RPC.
- ActuatorServiceGetResourcePackageProcedure = "/bytebase.v1.ActuatorService/GetResourcePackage"
// ActuatorServiceGetWorkspaceActuatorInfoProcedure is the fully-qualified name of the
// ActuatorService's GetWorkspaceActuatorInfo RPC.
ActuatorServiceGetWorkspaceActuatorInfoProcedure = "/bytebase.v1.ActuatorService/GetWorkspaceActuatorInfo"
@@ -62,9 +59,6 @@ type ActuatorServiceClient interface {
// Clears the system cache to force data refresh.
// Permissions required: None
DeleteCache(context.Context, *connect.Request[v1.DeleteCacheRequest]) (*connect.Response[emptypb.Empty], error)
- // Gets custom branding resources such as logos.
- // Permissions required: None
- GetResourcePackage(context.Context, *connect.Request[v1.GetResourcePackageRequest]) (*connect.Response[v1.ResourcePackage], error)
// Gets workspace-scoped actuator info. Requires authentication.
GetWorkspaceActuatorInfo(context.Context, *connect.Request[v1.GetWorkspaceActuatorInfoRequest]) (*connect.Response[v1.ActuatorInfo], error)
}
@@ -98,12 +92,6 @@ func NewActuatorServiceClient(httpClient connect.HTTPClient, baseURL string, opt
connect.WithSchema(actuatorServiceMethods.ByName("DeleteCache")),
connect.WithClientOptions(opts...),
),
- getResourcePackage: connect.NewClient[v1.GetResourcePackageRequest, v1.ResourcePackage](
- httpClient,
- baseURL+ActuatorServiceGetResourcePackageProcedure,
- connect.WithSchema(actuatorServiceMethods.ByName("GetResourcePackage")),
- connect.WithClientOptions(opts...),
- ),
getWorkspaceActuatorInfo: connect.NewClient[v1.GetWorkspaceActuatorInfoRequest, v1.ActuatorInfo](
httpClient,
baseURL+ActuatorServiceGetWorkspaceActuatorInfoProcedure,
@@ -118,7 +106,6 @@ type actuatorServiceClient struct {
getActuatorInfo *connect.Client[v1.GetActuatorInfoRequest, v1.ActuatorInfo]
setupSample *connect.Client[v1.SetupSampleRequest, emptypb.Empty]
deleteCache *connect.Client[v1.DeleteCacheRequest, emptypb.Empty]
- getResourcePackage *connect.Client[v1.GetResourcePackageRequest, v1.ResourcePackage]
getWorkspaceActuatorInfo *connect.Client[v1.GetWorkspaceActuatorInfoRequest, v1.ActuatorInfo]
}
@@ -137,11 +124,6 @@ func (c *actuatorServiceClient) DeleteCache(ctx context.Context, req *connect.Re
return c.deleteCache.CallUnary(ctx, req)
}
-// GetResourcePackage calls bytebase.v1.ActuatorService.GetResourcePackage.
-func (c *actuatorServiceClient) GetResourcePackage(ctx context.Context, req *connect.Request[v1.GetResourcePackageRequest]) (*connect.Response[v1.ResourcePackage], error) {
- return c.getResourcePackage.CallUnary(ctx, req)
-}
-
// GetWorkspaceActuatorInfo calls bytebase.v1.ActuatorService.GetWorkspaceActuatorInfo.
func (c *actuatorServiceClient) GetWorkspaceActuatorInfo(ctx context.Context, req *connect.Request[v1.GetWorkspaceActuatorInfoRequest]) (*connect.Response[v1.ActuatorInfo], error) {
return c.getWorkspaceActuatorInfo.CallUnary(ctx, req)
@@ -158,9 +140,6 @@ type ActuatorServiceHandler interface {
// Clears the system cache to force data refresh.
// Permissions required: None
DeleteCache(context.Context, *connect.Request[v1.DeleteCacheRequest]) (*connect.Response[emptypb.Empty], error)
- // Gets custom branding resources such as logos.
- // Permissions required: None
- GetResourcePackage(context.Context, *connect.Request[v1.GetResourcePackageRequest]) (*connect.Response[v1.ResourcePackage], error)
// Gets workspace-scoped actuator info. Requires authentication.
GetWorkspaceActuatorInfo(context.Context, *connect.Request[v1.GetWorkspaceActuatorInfoRequest]) (*connect.Response[v1.ActuatorInfo], error)
}
@@ -190,12 +169,6 @@ func NewActuatorServiceHandler(svc ActuatorServiceHandler, opts ...connect.Handl
connect.WithSchema(actuatorServiceMethods.ByName("DeleteCache")),
connect.WithHandlerOptions(opts...),
)
- actuatorServiceGetResourcePackageHandler := connect.NewUnaryHandler(
- ActuatorServiceGetResourcePackageProcedure,
- svc.GetResourcePackage,
- connect.WithSchema(actuatorServiceMethods.ByName("GetResourcePackage")),
- connect.WithHandlerOptions(opts...),
- )
actuatorServiceGetWorkspaceActuatorInfoHandler := connect.NewUnaryHandler(
ActuatorServiceGetWorkspaceActuatorInfoProcedure,
svc.GetWorkspaceActuatorInfo,
@@ -210,8 +183,6 @@ func NewActuatorServiceHandler(svc ActuatorServiceHandler, opts ...connect.Handl
actuatorServiceSetupSampleHandler.ServeHTTP(w, r)
case ActuatorServiceDeleteCacheProcedure:
actuatorServiceDeleteCacheHandler.ServeHTTP(w, r)
- case ActuatorServiceGetResourcePackageProcedure:
- actuatorServiceGetResourcePackageHandler.ServeHTTP(w, r)
case ActuatorServiceGetWorkspaceActuatorInfoProcedure:
actuatorServiceGetWorkspaceActuatorInfoHandler.ServeHTTP(w, r)
default:
@@ -235,10 +206,6 @@ func (UnimplementedActuatorServiceHandler) DeleteCache(context.Context, *connect
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ActuatorService.DeleteCache is not implemented"))
}
-func (UnimplementedActuatorServiceHandler) GetResourcePackage(context.Context, *connect.Request[v1.GetResourcePackageRequest]) (*connect.Response[v1.ResourcePackage], error) {
- return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ActuatorService.GetResourcePackage is not implemented"))
-}
-
func (UnimplementedActuatorServiceHandler) GetWorkspaceActuatorInfo(context.Context, *connect.Request[v1.GetWorkspaceActuatorInfoRequest]) (*connect.Response[v1.ActuatorInfo], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.ActuatorService.GetWorkspaceActuatorInfo is not implemented"))
}
diff --git a/backend/generated-go/v1/v1connect/workspace_service.connect.go b/backend/generated-go/v1/v1connect/workspace_service.connect.go
index 683310912c..e101a25b0e 100644
--- a/backend/generated-go/v1/v1connect/workspace_service.connect.go
+++ b/backend/generated-go/v1/v1connect/workspace_service.connect.go
@@ -33,6 +33,9 @@ const (
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
// period.
const (
+ // WorkspaceServiceGetWorkspaceProcedure is the fully-qualified name of the WorkspaceService's
+ // GetWorkspace RPC.
+ WorkspaceServiceGetWorkspaceProcedure = "/bytebase.v1.WorkspaceService/GetWorkspace"
// WorkspaceServiceListWorkspacesProcedure is the fully-qualified name of the WorkspaceService's
// ListWorkspaces RPC.
WorkspaceServiceListWorkspacesProcedure = "/bytebase.v1.WorkspaceService/ListWorkspaces"
@@ -49,6 +52,12 @@ const (
// WorkspaceServiceClient is a client for the bytebase.v1.WorkspaceService service.
type WorkspaceServiceClient interface {
+ // Gets a workspace by name.
+ // Supports "workspaces/-" to resolve the current workspace:
+ // - Authenticated: uses the workspace from JWT context
+ // - Self-hosted unauthenticated: returns the single workspace
+ // - SaaS unauthenticated: returns minimal response
+ GetWorkspace(context.Context, *connect.Request[v1.GetWorkspaceRequest]) (*connect.Response[v1.Workspace], error)
// Lists all workspaces the current user is a member of.
ListWorkspaces(context.Context, *connect.Request[v1.ListWorkspacesRequest]) (*connect.Response[v1.ListWorkspacesResponse], error)
// Updates a workspace. Currently only title can be updated.
@@ -72,6 +81,12 @@ func NewWorkspaceServiceClient(httpClient connect.HTTPClient, baseURL string, op
baseURL = strings.TrimRight(baseURL, "/")
workspaceServiceMethods := v1.File_v1_workspace_service_proto.Services().ByName("WorkspaceService").Methods()
return &workspaceServiceClient{
+ getWorkspace: connect.NewClient[v1.GetWorkspaceRequest, v1.Workspace](
+ httpClient,
+ baseURL+WorkspaceServiceGetWorkspaceProcedure,
+ connect.WithSchema(workspaceServiceMethods.ByName("GetWorkspace")),
+ connect.WithClientOptions(opts...),
+ ),
listWorkspaces: connect.NewClient[v1.ListWorkspacesRequest, v1.ListWorkspacesResponse](
httpClient,
baseURL+WorkspaceServiceListWorkspacesProcedure,
@@ -101,12 +116,18 @@ func NewWorkspaceServiceClient(httpClient connect.HTTPClient, baseURL string, op
// workspaceServiceClient implements WorkspaceServiceClient.
type workspaceServiceClient struct {
+ getWorkspace *connect.Client[v1.GetWorkspaceRequest, v1.Workspace]
listWorkspaces *connect.Client[v1.ListWorkspacesRequest, v1.ListWorkspacesResponse]
updateWorkspace *connect.Client[v1.UpdateWorkspaceRequest, v1.Workspace]
getIamPolicy *connect.Client[v1.GetIamPolicyRequest, v1.IamPolicy]
setIamPolicy *connect.Client[v1.SetIamPolicyRequest, v1.IamPolicy]
}
+// GetWorkspace calls bytebase.v1.WorkspaceService.GetWorkspace.
+func (c *workspaceServiceClient) GetWorkspace(ctx context.Context, req *connect.Request[v1.GetWorkspaceRequest]) (*connect.Response[v1.Workspace], error) {
+ return c.getWorkspace.CallUnary(ctx, req)
+}
+
// ListWorkspaces calls bytebase.v1.WorkspaceService.ListWorkspaces.
func (c *workspaceServiceClient) ListWorkspaces(ctx context.Context, req *connect.Request[v1.ListWorkspacesRequest]) (*connect.Response[v1.ListWorkspacesResponse], error) {
return c.listWorkspaces.CallUnary(ctx, req)
@@ -129,6 +150,12 @@ func (c *workspaceServiceClient) SetIamPolicy(ctx context.Context, req *connect.
// WorkspaceServiceHandler is an implementation of the bytebase.v1.WorkspaceService service.
type WorkspaceServiceHandler interface {
+ // Gets a workspace by name.
+ // Supports "workspaces/-" to resolve the current workspace:
+ // - Authenticated: uses the workspace from JWT context
+ // - Self-hosted unauthenticated: returns the single workspace
+ // - SaaS unauthenticated: returns minimal response
+ GetWorkspace(context.Context, *connect.Request[v1.GetWorkspaceRequest]) (*connect.Response[v1.Workspace], error)
// Lists all workspaces the current user is a member of.
ListWorkspaces(context.Context, *connect.Request[v1.ListWorkspacesRequest]) (*connect.Response[v1.ListWorkspacesResponse], error)
// Updates a workspace. Currently only title can be updated.
@@ -148,6 +175,12 @@ type WorkspaceServiceHandler interface {
// and JSON codecs. They also support gzip compression.
func NewWorkspaceServiceHandler(svc WorkspaceServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
workspaceServiceMethods := v1.File_v1_workspace_service_proto.Services().ByName("WorkspaceService").Methods()
+ workspaceServiceGetWorkspaceHandler := connect.NewUnaryHandler(
+ WorkspaceServiceGetWorkspaceProcedure,
+ svc.GetWorkspace,
+ connect.WithSchema(workspaceServiceMethods.ByName("GetWorkspace")),
+ connect.WithHandlerOptions(opts...),
+ )
workspaceServiceListWorkspacesHandler := connect.NewUnaryHandler(
WorkspaceServiceListWorkspacesProcedure,
svc.ListWorkspaces,
@@ -174,6 +207,8 @@ func NewWorkspaceServiceHandler(svc WorkspaceServiceHandler, opts ...connect.Han
)
return "/bytebase.v1.WorkspaceService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
switch r.URL.Path {
+ case WorkspaceServiceGetWorkspaceProcedure:
+ workspaceServiceGetWorkspaceHandler.ServeHTTP(w, r)
case WorkspaceServiceListWorkspacesProcedure:
workspaceServiceListWorkspacesHandler.ServeHTTP(w, r)
case WorkspaceServiceUpdateWorkspaceProcedure:
@@ -191,6 +226,10 @@ func NewWorkspaceServiceHandler(svc WorkspaceServiceHandler, opts ...connect.Han
// UnimplementedWorkspaceServiceHandler returns CodeUnimplemented from all methods.
type UnimplementedWorkspaceServiceHandler struct{}
+func (UnimplementedWorkspaceServiceHandler) GetWorkspace(context.Context, *connect.Request[v1.GetWorkspaceRequest]) (*connect.Response[v1.Workspace], error) {
+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.WorkspaceService.GetWorkspace is not implemented"))
+}
+
func (UnimplementedWorkspaceServiceHandler) ListWorkspaces(context.Context, *connect.Request[v1.ListWorkspacesRequest]) (*connect.Response[v1.ListWorkspacesResponse], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.WorkspaceService.ListWorkspaces is not implemented"))
}
diff --git a/backend/generated-go/v1/workspace_service.pb.go b/backend/generated-go/v1/workspace_service.pb.go
index e42b4c88a0..d0f7744554 100644
--- a/backend/generated-go/v1/workspace_service.pb.go
+++ b/backend/generated-go/v1/workspace_service.pb.go
@@ -103,18 +103,66 @@ func (x *ListWorkspacesResponse) GetWorkspaces() []*Workspace {
return nil
}
+type GetWorkspaceRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The workspace name, format: workspaces/{workspace}.
+ // Use "workspaces/-" to get the current/default workspace.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetWorkspaceRequest) Reset() {
+ *x = GetWorkspaceRequest{}
+ mi := &file_v1_workspace_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetWorkspaceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetWorkspaceRequest) ProtoMessage() {}
+
+func (x *GetWorkspaceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_workspace_service_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetWorkspaceRequest.ProtoReflect.Descriptor instead.
+func (*GetWorkspaceRequest) Descriptor() ([]byte, []int) {
+ return file_v1_workspace_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *GetWorkspaceRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
type Workspace struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Format: workspaces/{workspace}
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
+ // The branding logo.
+ Logo string `protobuf:"bytes,3,opt,name=logo,proto3" json:"logo,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Workspace) Reset() {
*x = Workspace{}
- mi := &file_v1_workspace_service_proto_msgTypes[2]
+ mi := &file_v1_workspace_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -126,7 +174,7 @@ func (x *Workspace) String() string {
func (*Workspace) ProtoMessage() {}
func (x *Workspace) ProtoReflect() protoreflect.Message {
- mi := &file_v1_workspace_service_proto_msgTypes[2]
+ mi := &file_v1_workspace_service_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -139,7 +187,7 @@ func (x *Workspace) ProtoReflect() protoreflect.Message {
// Deprecated: Use Workspace.ProtoReflect.Descriptor instead.
func (*Workspace) Descriptor() ([]byte, []int) {
- return file_v1_workspace_service_proto_rawDescGZIP(), []int{2}
+ return file_v1_workspace_service_proto_rawDescGZIP(), []int{3}
}
func (x *Workspace) GetName() string {
@@ -156,6 +204,13 @@ func (x *Workspace) GetTitle() string {
return ""
}
+func (x *Workspace) GetLogo() string {
+ if x != nil {
+ return x.Logo
+ }
+ return ""
+}
+
type UpdateWorkspaceRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Workspace *Workspace `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"`
@@ -166,7 +221,7 @@ type UpdateWorkspaceRequest struct {
func (x *UpdateWorkspaceRequest) Reset() {
*x = UpdateWorkspaceRequest{}
- mi := &file_v1_workspace_service_proto_msgTypes[3]
+ mi := &file_v1_workspace_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -178,7 +233,7 @@ func (x *UpdateWorkspaceRequest) String() string {
func (*UpdateWorkspaceRequest) ProtoMessage() {}
func (x *UpdateWorkspaceRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_workspace_service_proto_msgTypes[3]
+ mi := &file_v1_workspace_service_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -191,7 +246,7 @@ func (x *UpdateWorkspaceRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateWorkspaceRequest.ProtoReflect.Descriptor instead.
func (*UpdateWorkspaceRequest) Descriptor() ([]byte, []int) {
- return file_v1_workspace_service_proto_rawDescGZIP(), []int{3}
+ return file_v1_workspace_service_proto_rawDescGZIP(), []int{4}
}
func (x *UpdateWorkspaceRequest) GetWorkspace() *Workspace {
@@ -217,15 +272,19 @@ const file_v1_workspace_service_proto_rawDesc = "" +
"\x16ListWorkspacesResponse\x126\n" +
"\n" +
"workspaces\x18\x01 \x03(\v2\x16.bytebase.v1.WorkspaceR\n" +
- "workspaces\"5\n" +
+ "workspaces\")\n" +
+ "\x13GetWorkspaceRequest\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\"I\n" +
"\tWorkspace\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
- "\x05title\x18\x02 \x01(\tR\x05title\"\x90\x01\n" +
+ "\x05title\x18\x02 \x01(\tR\x05title\x12\x12\n" +
+ "\x04logo\x18\x03 \x01(\tR\x04logo\"\x90\x01\n" +
"\x16UpdateWorkspaceRequest\x129\n" +
"\tworkspace\x18\x01 \x01(\v2\x16.bytebase.v1.WorkspaceB\x03\xe0A\x02R\tworkspace\x12;\n" +
"\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" +
- "updateMask2\xed\x04\n" +
- "\x10WorkspaceService\x12u\n" +
+ "updateMask2\xdc\x05\n" +
+ "\x10WorkspaceService\x12m\n" +
+ "\fGetWorkspace\x12 .bytebase.v1.GetWorkspaceRequest\x1a\x16.bytebase.v1.Workspace\"#\x80\xea0\x01\x82\xd3\xe4\x93\x02\x19\x12\x17/v1/{name=workspaces/*}\x12u\n" +
"\x0eListWorkspaces\x12\".bytebase.v1.ListWorkspacesRequest\x1a#.bytebase.v1.ListWorkspacesResponse\"\x1a\x90\xea0\x02\x82\xd3\xe4\x93\x02\x10\x12\x0e/v1/workspaces\x12\x9c\x01\n" +
"\x0fUpdateWorkspace\x12#.bytebase.v1.UpdateWorkspaceRequest\x1a\x16.bytebase.v1.Workspace\"L\x8a\xea0\x14bb.workspaces.update\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02&:\x01*2!/v1/{workspace.name=workspaces/*}\x12\x9c\x01\n" +
"\fGetIamPolicy\x12 .bytebase.v1.GetIamPolicyRequest\x1a\x16.bytebase.v1.IamPolicy\"R\x8a\xea0\x1abb.workspaces.getIamPolicy\x90\xea0\x01\x82\xd3\xe4\x93\x02*\x12(/v1/{resource=workspaces/*}:getIamPolicy\x12\xa3\x01\n" +
@@ -244,31 +303,34 @@ func file_v1_workspace_service_proto_rawDescGZIP() []byte {
return file_v1_workspace_service_proto_rawDescData
}
-var file_v1_workspace_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_v1_workspace_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_v1_workspace_service_proto_goTypes = []any{
(*ListWorkspacesRequest)(nil), // 0: bytebase.v1.ListWorkspacesRequest
(*ListWorkspacesResponse)(nil), // 1: bytebase.v1.ListWorkspacesResponse
- (*Workspace)(nil), // 2: bytebase.v1.Workspace
- (*UpdateWorkspaceRequest)(nil), // 3: bytebase.v1.UpdateWorkspaceRequest
- (*fieldmaskpb.FieldMask)(nil), // 4: google.protobuf.FieldMask
- (*GetIamPolicyRequest)(nil), // 5: bytebase.v1.GetIamPolicyRequest
- (*SetIamPolicyRequest)(nil), // 6: bytebase.v1.SetIamPolicyRequest
- (*IamPolicy)(nil), // 7: bytebase.v1.IamPolicy
+ (*GetWorkspaceRequest)(nil), // 2: bytebase.v1.GetWorkspaceRequest
+ (*Workspace)(nil), // 3: bytebase.v1.Workspace
+ (*UpdateWorkspaceRequest)(nil), // 4: bytebase.v1.UpdateWorkspaceRequest
+ (*fieldmaskpb.FieldMask)(nil), // 5: google.protobuf.FieldMask
+ (*GetIamPolicyRequest)(nil), // 6: bytebase.v1.GetIamPolicyRequest
+ (*SetIamPolicyRequest)(nil), // 7: bytebase.v1.SetIamPolicyRequest
+ (*IamPolicy)(nil), // 8: bytebase.v1.IamPolicy
}
var file_v1_workspace_service_proto_depIdxs = []int32{
- 2, // 0: bytebase.v1.ListWorkspacesResponse.workspaces:type_name -> bytebase.v1.Workspace
- 2, // 1: bytebase.v1.UpdateWorkspaceRequest.workspace:type_name -> bytebase.v1.Workspace
- 4, // 2: bytebase.v1.UpdateWorkspaceRequest.update_mask:type_name -> google.protobuf.FieldMask
- 0, // 3: bytebase.v1.WorkspaceService.ListWorkspaces:input_type -> bytebase.v1.ListWorkspacesRequest
- 3, // 4: bytebase.v1.WorkspaceService.UpdateWorkspace:input_type -> bytebase.v1.UpdateWorkspaceRequest
- 5, // 5: bytebase.v1.WorkspaceService.GetIamPolicy:input_type -> bytebase.v1.GetIamPolicyRequest
- 6, // 6: bytebase.v1.WorkspaceService.SetIamPolicy:input_type -> bytebase.v1.SetIamPolicyRequest
- 1, // 7: bytebase.v1.WorkspaceService.ListWorkspaces:output_type -> bytebase.v1.ListWorkspacesResponse
- 2, // 8: bytebase.v1.WorkspaceService.UpdateWorkspace:output_type -> bytebase.v1.Workspace
- 7, // 9: bytebase.v1.WorkspaceService.GetIamPolicy:output_type -> bytebase.v1.IamPolicy
- 7, // 10: bytebase.v1.WorkspaceService.SetIamPolicy:output_type -> bytebase.v1.IamPolicy
- 7, // [7:11] is the sub-list for method output_type
- 3, // [3:7] is the sub-list for method input_type
+ 3, // 0: bytebase.v1.ListWorkspacesResponse.workspaces:type_name -> bytebase.v1.Workspace
+ 3, // 1: bytebase.v1.UpdateWorkspaceRequest.workspace:type_name -> bytebase.v1.Workspace
+ 5, // 2: bytebase.v1.UpdateWorkspaceRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 2, // 3: bytebase.v1.WorkspaceService.GetWorkspace:input_type -> bytebase.v1.GetWorkspaceRequest
+ 0, // 4: bytebase.v1.WorkspaceService.ListWorkspaces:input_type -> bytebase.v1.ListWorkspacesRequest
+ 4, // 5: bytebase.v1.WorkspaceService.UpdateWorkspace:input_type -> bytebase.v1.UpdateWorkspaceRequest
+ 6, // 6: bytebase.v1.WorkspaceService.GetIamPolicy:input_type -> bytebase.v1.GetIamPolicyRequest
+ 7, // 7: bytebase.v1.WorkspaceService.SetIamPolicy:input_type -> bytebase.v1.SetIamPolicyRequest
+ 3, // 8: bytebase.v1.WorkspaceService.GetWorkspace:output_type -> bytebase.v1.Workspace
+ 1, // 9: bytebase.v1.WorkspaceService.ListWorkspaces:output_type -> bytebase.v1.ListWorkspacesResponse
+ 3, // 10: bytebase.v1.WorkspaceService.UpdateWorkspace:output_type -> bytebase.v1.Workspace
+ 8, // 11: bytebase.v1.WorkspaceService.GetIamPolicy:output_type -> bytebase.v1.IamPolicy
+ 8, // 12: bytebase.v1.WorkspaceService.SetIamPolicy:output_type -> bytebase.v1.IamPolicy
+ 8, // [8:13] is the sub-list for method output_type
+ 3, // [3:8] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
@@ -287,7 +349,7 @@ func file_v1_workspace_service_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_workspace_service_proto_rawDesc), len(file_v1_workspace_service_proto_rawDesc)),
NumEnums: 0,
- NumMessages: 4,
+ NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/backend/generated-go/v1/workspace_service.pb.gw.go b/backend/generated-go/v1/workspace_service.pb.gw.go
index c86d991310..f326aed22d 100644
--- a/backend/generated-go/v1/workspace_service.pb.gw.go
+++ b/backend/generated-go/v1/workspace_service.pb.gw.go
@@ -35,6 +35,45 @@ var (
_ = metadata.Join
)
+func request_WorkspaceService_GetWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq GetWorkspaceRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ if req.Body != nil {
+ _, _ = io.Copy(io.Discard, req.Body)
+ }
+ val, ok := pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+ msg, err := client.GetWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_WorkspaceService_GetWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq GetWorkspaceRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ val, ok := pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+ msg, err := server.GetWorkspace(ctx, &protoReq)
+ return msg, metadata, err
+}
+
func request_WorkspaceService_ListWorkspaces_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq ListWorkspacesRequest
@@ -191,6 +230,26 @@ func local_request_WorkspaceService_SetIamPolicy_0(ctx context.Context, marshale
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWorkspaceServiceHandlerFromEndpoint instead.
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkspaceServiceServer) error {
+ mux.Handle(http.MethodGet, pattern_WorkspaceService_GetWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.WorkspaceService/GetWorkspace", runtime.WithHTTPPathPattern("/v1/{name=workspaces/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_WorkspaceService_GetWorkspace_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_WorkspaceService_GetWorkspace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
mux.Handle(http.MethodGet, pattern_WorkspaceService_ListWorkspaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -311,6 +370,23 @@ func RegisterWorkspaceServiceHandler(ctx context.Context, mux *runtime.ServeMux,
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "WorkspaceServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkspaceServiceClient) error {
+ mux.Handle(http.MethodGet, pattern_WorkspaceService_GetWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.WorkspaceService/GetWorkspace", runtime.WithHTTPPathPattern("/v1/{name=workspaces/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_WorkspaceService_GetWorkspace_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_WorkspaceService_GetWorkspace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
mux.Handle(http.MethodGet, pattern_WorkspaceService_ListWorkspaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -383,6 +459,7 @@ func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.Ser
}
var (
+ pattern_WorkspaceService_GetWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "workspaces", "name"}, ""))
pattern_WorkspaceService_ListWorkspaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "workspaces"}, ""))
pattern_WorkspaceService_UpdateWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "workspaces", "workspace.name"}, ""))
pattern_WorkspaceService_GetIamPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "workspaces", "resource"}, "getIamPolicy"))
@@ -390,6 +467,7 @@ var (
)
var (
+ forward_WorkspaceService_GetWorkspace_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_ListWorkspaces_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_UpdateWorkspace_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_GetIamPolicy_0 = runtime.ForwardResponseMessage
diff --git a/backend/generated-go/v1/workspace_service_equal.pb.go b/backend/generated-go/v1/workspace_service_equal.pb.go
index e6a8aa5124..a9a57db10f 100644
--- a/backend/generated-go/v1/workspace_service_equal.pb.go
+++ b/backend/generated-go/v1/workspace_service_equal.pb.go
@@ -36,6 +36,19 @@ func (x *ListWorkspacesResponse) Equal(y *ListWorkspacesResponse) bool {
return true
}
+func (x *GetWorkspaceRequest) Equal(y *GetWorkspaceRequest) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.Name != y.Name {
+ return false
+ }
+ return true
+}
+
func (x *Workspace) Equal(y *Workspace) bool {
if x == y {
return true
@@ -49,6 +62,9 @@ func (x *Workspace) Equal(y *Workspace) bool {
if x.Title != y.Title {
return false
}
+ if x.Logo != y.Logo {
+ return false
+ }
return true
}
diff --git a/backend/generated-go/v1/workspace_service_grpc.pb.go b/backend/generated-go/v1/workspace_service_grpc.pb.go
index b52f6b46f3..d174b2b179 100644
--- a/backend/generated-go/v1/workspace_service_grpc.pb.go
+++ b/backend/generated-go/v1/workspace_service_grpc.pb.go
@@ -19,6 +19,7 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
+ WorkspaceService_GetWorkspace_FullMethodName = "/bytebase.v1.WorkspaceService/GetWorkspace"
WorkspaceService_ListWorkspaces_FullMethodName = "/bytebase.v1.WorkspaceService/ListWorkspaces"
WorkspaceService_UpdateWorkspace_FullMethodName = "/bytebase.v1.WorkspaceService/UpdateWorkspace"
WorkspaceService_GetIamPolicy_FullMethodName = "/bytebase.v1.WorkspaceService/GetIamPolicy"
@@ -31,6 +32,12 @@ const (
//
// WorkspaceService manages workspace-level operations and profile.
type WorkspaceServiceClient interface {
+ // Gets a workspace by name.
+ // Supports "workspaces/-" to resolve the current workspace:
+ // - Authenticated: uses the workspace from JWT context
+ // - Self-hosted unauthenticated: returns the single workspace
+ // - SaaS unauthenticated: returns minimal response
+ GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error)
// Lists all workspaces the current user is a member of.
ListWorkspaces(ctx context.Context, in *ListWorkspacesRequest, opts ...grpc.CallOption) (*ListWorkspacesResponse, error)
// Updates a workspace. Currently only title can be updated.
@@ -51,6 +58,16 @@ func NewWorkspaceServiceClient(cc grpc.ClientConnInterface) WorkspaceServiceClie
return &workspaceServiceClient{cc}
}
+func (c *workspaceServiceClient) GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(Workspace)
+ err := c.cc.Invoke(ctx, WorkspaceService_GetWorkspace_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *workspaceServiceClient) ListWorkspaces(ctx context.Context, in *ListWorkspacesRequest, opts ...grpc.CallOption) (*ListWorkspacesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListWorkspacesResponse)
@@ -97,6 +114,12 @@ func (c *workspaceServiceClient) SetIamPolicy(ctx context.Context, in *SetIamPol
//
// WorkspaceService manages workspace-level operations and profile.
type WorkspaceServiceServer interface {
+ // Gets a workspace by name.
+ // Supports "workspaces/-" to resolve the current workspace:
+ // - Authenticated: uses the workspace from JWT context
+ // - Self-hosted unauthenticated: returns the single workspace
+ // - SaaS unauthenticated: returns minimal response
+ GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error)
// Lists all workspaces the current user is a member of.
ListWorkspaces(context.Context, *ListWorkspacesRequest) (*ListWorkspacesResponse, error)
// Updates a workspace. Currently only title can be updated.
@@ -117,6 +140,9 @@ type WorkspaceServiceServer interface {
// pointer dereference when methods are called.
type UnimplementedWorkspaceServiceServer struct{}
+func (UnimplementedWorkspaceServiceServer) GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error) {
+ return nil, status.Error(codes.Unimplemented, "method GetWorkspace not implemented")
+}
func (UnimplementedWorkspaceServiceServer) ListWorkspaces(context.Context, *ListWorkspacesRequest) (*ListWorkspacesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ListWorkspaces not implemented")
}
@@ -150,6 +176,24 @@ func RegisterWorkspaceServiceServer(s grpc.ServiceRegistrar, srv WorkspaceServic
s.RegisterService(&WorkspaceService_ServiceDesc, srv)
}
+func _WorkspaceService_GetWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetWorkspaceRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(WorkspaceServiceServer).GetWorkspace(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: WorkspaceService_GetWorkspace_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(WorkspaceServiceServer).GetWorkspace(ctx, req.(*GetWorkspaceRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _WorkspaceService_ListWorkspaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkspacesRequest)
if err := dec(in); err != nil {
@@ -229,6 +273,10 @@ var WorkspaceService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "bytebase.v1.WorkspaceService",
HandlerType: (*WorkspaceServiceServer)(nil),
Methods: []grpc.MethodDesc{
+ {
+ MethodName: "GetWorkspace",
+ Handler: _WorkspaceService_GetWorkspace_Handler,
+ },
{
MethodName: "ListWorkspaces",
Handler: _WorkspaceService_ListWorkspaces_Handler,
diff --git a/backend/migrator/migration/3.17/0013##workspace_payload.sql b/backend/migrator/migration/3.17/0013##workspace_payload.sql
new file mode 100644
index 0000000000..c651a18eee
--- /dev/null
+++ b/backend/migrator/migration/3.17/0013##workspace_payload.sql
@@ -0,0 +1,32 @@
+-- Move workspace.name and branding_logo into a JSONB payload column.
+-- The payload stores WorkspacePayload proto (title, branding_logo, etc.)
+
+-- Add payload column if it doesn't exist.
+DO $$
+BEGIN
+ IF NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name = 'workspace' AND column_name = 'payload') THEN
+ ALTER TABLE workspace ADD COLUMN payload jsonb NOT NULL DEFAULT '{}';
+ END IF;
+END $$;
+
+-- Migrate name into payload.title if the name column still exists.
+DO $$
+BEGIN
+ IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name = 'workspace' AND column_name = 'name') THEN
+ UPDATE workspace SET payload = jsonb_set(payload, '{title}', to_jsonb(name))
+ WHERE payload->>'title' IS NULL OR payload->>'title' = '';
+ ALTER TABLE workspace DROP COLUMN name;
+ END IF;
+END $$;
+
+-- Migrate branding_logo from WORKSPACE_PROFILE setting into workspace.payload.logo.
+-- The setting value is protojson (camelCase), so the source key is "brandingLogo".
+-- The destination key is "logo" (new WorkspacePayload proto field).
+UPDATE workspace w
+SET payload = jsonb_set(w.payload, '{logo}', to_jsonb(s.value->>'brandingLogo'))
+FROM setting s
+WHERE s.workspace = w.resource_id
+ AND s.name = 'WORKSPACE_PROFILE'
+ AND s.value->>'brandingLogo' IS NOT NULL
+ AND s.value->>'brandingLogo' != ''
+ AND (w.payload->>'logo' IS NULL OR w.payload->>'logo' = '');
diff --git a/backend/migrator/migration/LATEST.sql b/backend/migrator/migration/LATEST.sql
index b2b87f77f4..fcc63ceae5 100644
--- a/backend/migrator/migration/LATEST.sql
+++ b/backend/migrator/migration/LATEST.sql
@@ -11,7 +11,8 @@ CREATE TABLE server_config (
CREATE TABLE workspace (
resource_id text PRIMARY KEY,
- name text NOT NULL,
+ -- Stored as WorkspacePayload (proto/store/store/workspace.proto)
+ payload jsonb NOT NULL DEFAULT '{}',
created_at timestamptz NOT NULL DEFAULT now(),
deleted boolean NOT NULL DEFAULT FALSE
);
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index 0c709cbcfe..a874422ad3 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -15,8 +15,8 @@ import (
func TestLatestVersion(t *testing.T) {
files, err := getSortedVersionedFiles()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("3.17.12"), *files[len(files)-1].version)
- require.Equal(t, "migration/3.17/0012##classification_level_to_int.sql", files[len(files)-1].path)
+ require.Equal(t, semver.MustParse("3.17.13"), *files[len(files)-1].version)
+ require.Equal(t, "migration/3.17/0013##workspace_payload.sql", files[len(files)-1].path)
}
func TestVersionUnique(t *testing.T) {
diff --git a/backend/server/grpc_routes.go b/backend/server/grpc_routes.go
index 79a5dc8d0e..70a19b81e4 100644
--- a/backend/server/grpc_routes.go
+++ b/backend/server/grpc_routes.go
@@ -117,7 +117,7 @@ func configureGrpcRouters(
serviceAccountService := apiv1.NewServiceAccountService(stores, profile, iamManager)
workloadIdentityService := apiv1.NewWorkloadIdentityService(stores, profile, iamManager)
worksheetService := apiv1.NewWorksheetService(stores, iamManager)
- workspaceService := apiv1.NewWorkspaceService(stores, iamManager, profile)
+ workspaceService := apiv1.NewWorkspaceService(stores, iamManager, profile, licenseService)
onPanic := func(_ context.Context, s connect.Spec, _ http.Header, p any) error {
stack := stacktrace.TakeStacktrace(20 /* n */, 5 /* skip */)
diff --git a/backend/store/workspace.go b/backend/store/workspace.go
index 622a5e19f5..a0e6cad797 100644
--- a/backend/store/workspace.go
+++ b/backend/store/workspace.go
@@ -19,20 +19,48 @@ import (
// WorkspaceMessage is the message for a workspace.
type WorkspaceMessage struct {
ResourceID string
- Name string
+ Payload *storepb.WorkspacePayload
}
// getWorkspace returns the workspace. Returns (nil, nil) if no workspace exists.
func (s *Store) getWorkspace(ctx context.Context) (*WorkspaceMessage, error) {
var workspace WorkspaceMessage
+ var payloadBytes []byte
if err := s.GetDB().QueryRowContext(ctx,
- `SELECT resource_id, name FROM workspace WHERE deleted = FALSE LIMIT 1`,
- ).Scan(&workspace.ResourceID, &workspace.Name); err != nil {
+ `SELECT resource_id, payload FROM workspace WHERE deleted = FALSE LIMIT 1`,
+ ).Scan(&workspace.ResourceID, &payloadBytes); err != nil {
if err == sql.ErrNoRows {
return nil, nil
}
return nil, errors.Wrap(err, "failed to get workspace")
}
+ payload := &storepb.WorkspacePayload{}
+ if err := common.ProtojsonUnmarshaler.Unmarshal(payloadBytes, payload); err != nil {
+ return nil, errors.Wrap(err, "failed to unmarshal workspace payload")
+ }
+ workspace.Payload = payload
+ return &workspace, nil
+}
+
+// GetWorkspaceByID gets a workspace by its resource ID.
+// Returns (nil, nil) if not found.
+func (s *Store) GetWorkspaceByID(ctx context.Context, resourceID string) (*WorkspaceMessage, error) {
+ var workspace WorkspaceMessage
+ var payloadBytes []byte
+ if err := s.GetDB().QueryRowContext(ctx,
+ `SELECT resource_id, payload FROM workspace WHERE resource_id = $1 AND deleted = FALSE`,
+ resourceID,
+ ).Scan(&workspace.ResourceID, &payloadBytes); err != nil {
+ if err == sql.ErrNoRows {
+ return nil, nil
+ }
+ return nil, errors.Wrap(err, "failed to get workspace")
+ }
+ payload := &storepb.WorkspacePayload{}
+ if err := common.ProtojsonUnmarshaler.Unmarshal(payloadBytes, payload); err != nil {
+ return nil, errors.Wrap(err, "failed to unmarshal workspace payload")
+ }
+ workspace.Payload = payload
return &workspace, nil
}
@@ -58,9 +86,16 @@ func (s *Store) CreateWorkspace(ctx context.Context, create *WorkspaceMessage, a
defer tx.Rollback()
// Create workspace.
+ if create.Payload == nil {
+ create.Payload = &storepb.WorkspacePayload{}
+ }
+ payloadBytes, err := protojson.Marshal(create.Payload)
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to marshal workspace payload")
+ }
if _, err := tx.ExecContext(ctx,
- `INSERT INTO workspace (resource_id, name) VALUES ($1, $2)`,
- create.ResourceID, create.Name,
+ `INSERT INTO workspace (resource_id, payload) VALUES ($1, $2)`,
+ create.ResourceID, payloadBytes,
); err != nil {
return nil, errors.Wrap(err, "failed to create workspace")
}
@@ -153,15 +188,20 @@ func (s *Store) CreateWorkspace(ctx context.Context, create *WorkspaceMessage, a
type UpdateWorkspaceMessage struct {
ResourceID string
Title *string
+ Logo *string
}
-// UpdateWorkspace updates a workspace.
+// UpdateWorkspace updates workspace payload fields atomically using jsonb_set.
+// Each field is updated independently in SQL to avoid lost-update races.
func (s *Store) UpdateWorkspace(ctx context.Context, patch *UpdateWorkspaceMessage) error {
- set := qb.Q()
+ q := qb.Q().Space("UPDATE workspace SET payload = payload")
if v := patch.Title; v != nil {
- set.Comma("name = ?", *v)
+ q.Space("|| jsonb_build_object('title', ?::text)", *v)
}
- q := qb.Q().Space("UPDATE workspace SET ? WHERE resource_id = ? AND deleted = FALSE", set, patch.ResourceID)
+ if v := patch.Logo; v != nil {
+ q.Space("|| jsonb_build_object('logo', ?::text)", *v)
+ }
+ q.Space("WHERE resource_id = ? AND deleted = FALSE", patch.ResourceID)
query, args, err := q.ToSQL()
if err != nil {
return errors.Wrapf(err, "failed to build sql")
@@ -220,7 +260,7 @@ func (s *Store) ListWorkspacesByEmail(ctx context.Context, find *FindWorkspaceMe
}
q := qb.Q().Space(`
- SELECT DISTINCT w.resource_id, w.name
+ SELECT DISTINCT w.resource_id, w.payload, w.created_at
FROM workspace w
JOIN policy p ON p.workspace = w.resource_id
WHERE p.resource_type = ?
@@ -236,7 +276,7 @@ func (s *Store) ListWorkspacesByEmail(ctx context.Context, find *FindWorkspaceMe
if v := find.WorkspaceID; v != nil {
q.And("w.resource_id = ?", *v)
}
- q.Space("ORDER BY w.name")
+ q.Space("ORDER BY w.created_at")
query, args, err := q.ToSQL()
if err != nil {
@@ -252,9 +292,16 @@ func (s *Store) ListWorkspacesByEmail(ctx context.Context, find *FindWorkspaceMe
var workspaces []*WorkspaceMessage
for rows.Next() {
var ws WorkspaceMessage
- if err := rows.Scan(&ws.ResourceID, &ws.Name); err != nil {
+ var payloadBytes []byte
+ var createdAt any
+ if err := rows.Scan(&ws.ResourceID, &payloadBytes, &createdAt); err != nil {
return nil, errors.Wrap(err, "failed to scan workspace")
}
+ payload := &storepb.WorkspacePayload{}
+ if err := common.ProtojsonUnmarshaler.Unmarshal(payloadBytes, payload); err != nil {
+ return nil, errors.Wrap(err, "failed to unmarshal workspace payload")
+ }
+ ws.Payload = payload
workspaces = append(workspaces, &ws)
}
if err := rows.Err(); err != nil {
diff --git a/frontend/src/components/BytebaseLogo.vue b/frontend/src/components/BytebaseLogo.vue
index 81a70fc5b8..61e1121d30 100644
--- a/frontend/src/components/BytebaseLogo.vue
+++ b/frontend/src/components/BytebaseLogo.vue
@@ -15,8 +15,8 @@
exact-active-class=""
>
<img
- v-if="customBrandingLogo"
- :src="customBrandingLogo"
+ v-if="workspaceStore.currentWorkspace?.logo"
+ :src="workspaceStore.currentWorkspace?.logo"
alt="branding logo"
class="h-full object-contain"
/>
@@ -35,7 +35,7 @@
import { computed } from "vue";
import { useRouter } from "vue-router";
import { useRecentVisit } from "@/router/useRecentVisit";
-import { useActuatorV1Store } from "@/store/modules/v1/actuator";
+import { useWorkspaceV1Store } from "@/store";
const props = withDefaults(
defineProps<{
@@ -49,10 +49,7 @@ const props = withDefaults(
const component = computed(() => (props.redirect ? "router-link" : "span"));
const { record } = useRecentVisit();
const router = useRouter();
-
-const customBrandingLogo = computed((): string => {
- return useActuatorV1Store().brandingLogo;
-});
+const workspaceStore = useWorkspaceV1Store();
const recordRedirect = () => {
if (!props.redirect) {
diff --git a/frontend/src/components/GeneralSetting/BrandingSetting.vue b/frontend/src/components/GeneralSetting/BrandingSetting.vue
index 39fcd28293..77a2481c3f 100644
--- a/frontend/src/components/GeneralSetting/BrandingSetting.vue
+++ b/frontend/src/components/GeneralSetting/BrandingSetting.vue
@@ -19,7 +19,7 @@
:permissions="['bb.workspaces.update']"
>
<NInput
- v-model:value="state.workspaceTitle"
+ v-model:value="state.title"
class="mt-1"
:disabled="slotProps.disabled"
/>
@@ -38,7 +38,7 @@
<PermissionGuardWrapper
v-slot="slotProps"
:permissions="[
- 'bb.settings.setWorkspaceProfile'
+ 'bb.workspaces.update'
]"
>
<div
@@ -64,7 +64,7 @@
<PermissionGuardWrapper
v-slot="slotProps"
:permissions="[
- 'bb.settings.setWorkspaceProfile'
+ 'bb.workspaces.update'
]"
>
<NButton
@@ -90,29 +90,19 @@
<script lang="ts" setup>
import { create } from "@bufbuild/protobuf";
-import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";
import { NButton, NInput } from "naive-ui";
-import { computed, reactive } from "vue";
+import { computed, reactive, watchEffect } from "vue";
import PermissionGuardWrapper from "@/components/Permission/PermissionGuardWrapper.vue";
-import { workspaceServiceClientConnect } from "@/connect";
-import {
- featureToRef,
- useActuatorV1Store,
- useSettingV1Store,
- useWorkspaceV1Store,
-} from "@/store";
+import { featureToRef, useWorkspaceV1Store } from "@/store";
import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
-import {
- UpdateWorkspaceRequestSchema,
- WorkspaceSchema,
-} from "@/types/proto-es/v1/workspace_service_pb";
+import { WorkspaceSchema } from "@/types/proto-es/v1/workspace_service_pb";
import { FeatureBadge, FeatureModal } from "../FeatureGuard";
import SingleFileSelector from "../SingleFileSelector.vue";
interface LocalState {
logoUrl?: string;
loading: boolean;
- workspaceTitle: string;
+ title?: string;
showFeatureModal: boolean;
}
@@ -132,30 +122,38 @@ const convertFileToBase64 = (file: File) =>
reader.onerror = (error) => reject(error);
});
-const settingV1Store = useSettingV1Store();
const workspaceStore = useWorkspaceV1Store();
-const actuatorV1Store = useActuatorV1Store();
-
-const initialTitle = computed(() => {
- return workspaceStore.currentWorkspace?.title ?? "";
-});
const state = reactive<LocalState>({
- logoUrl: settingV1Store.workspaceProfile.brandingLogo,
- workspaceTitle: initialTitle.value,
+ logoUrl: workspaceStore.currentWorkspace?.logo,
+ title: workspaceStore.currentWorkspace?.title,
loading: false,
showFeatureModal: false,
});
+// Re-sync local state when the workspace loads asynchronously,
+// but only if the user hasn't made edits yet.
+watchEffect(() => {
+ const ws = workspaceStore.currentWorkspace;
+ if (!ws || allowSave.value) return;
+ state.title = ws.title ?? "";
+ state.logoUrl = ws.logo;
+});
+
const workspaceID = computed(() => {
const name = workspaceStore.currentWorkspace?.name ?? "";
return name.replace(/^workspaces\//, "");
});
const allowSave = computed((): boolean => {
+ if (!workspaceStore.currentWorkspace) {
+ return false;
+ }
return (
- state.workspaceTitle !== initialTitle.value ||
- state.logoUrl !== settingV1Store.workspaceProfile.brandingLogo
+ (state.title &&
+ state.title !== workspaceStore.currentWorkspace?.title &&
+ state.title.trim() !== "") ||
+ state.logoUrl !== workspaceStore.currentWorkspace?.logo
);
});
@@ -166,37 +164,25 @@ const doUpdate = async (content: string) => {
return;
}
state.loading = true;
+
+ const updateMasks: string[] = [];
+ const workspace = create(WorkspaceSchema, workspaceStore.currentWorkspace);
try {
if (
- state.workspaceTitle !== initialTitle.value &&
- state.workspaceTitle.trim() !== ""
+ state.title &&
+ state.title !== workspaceStore.currentWorkspace?.title &&
+ state.title.trim() !== ""
) {
- const name = workspaceStore.currentWorkspace?.name ?? "";
- await workspaceServiceClientConnect.updateWorkspace(
- create(UpdateWorkspaceRequestSchema, {
- workspace: create(WorkspaceSchema, {
- name,
- title: state.workspaceTitle,
- }),
- updateMask: create(FieldMaskSchema, {
- paths: ["title"],
- }),
- })
- );
- await workspaceStore.fetchWorkspaceList();
+ workspace.title = state.title;
+ updateMasks.push("title");
}
- if (state.logoUrl !== settingV1Store.workspaceProfile.brandingLogo) {
- await settingV1Store.updateWorkspaceProfile({
- payload: {
- brandingLogo: content,
- },
- updateMask: create(FieldMaskSchema, {
- paths: ["value.workspace_profile.branding_logo"],
- }),
- });
- actuatorV1Store.setLogo(content);
+ if (state.logoUrl !== workspaceStore.currentWorkspace?.logo) {
+ workspace.logo = content;
+ updateMasks.push("logo");
}
+
+ await workspaceStore.updateWorkspace(workspace, updateMasks);
} finally {
state.loading = false;
}
@@ -216,8 +202,8 @@ defineExpose({
isDirty: allowSave,
update: uploadLogo,
revert: () => {
- state.logoUrl = settingV1Store.workspaceProfile.brandingLogo;
- state.workspaceTitle = initialTitle.value;
+ state.logoUrl = workspaceStore.currentWorkspace?.logo;
+ state.title = workspaceStore.currentWorkspace?.title;
},
});
</script>
diff --git a/frontend/src/components/ProfileBrandingLogo.vue b/frontend/src/components/ProfileBrandingLogo.vue
index 5b72ae2d80..68f60e1fa5 100644
--- a/frontend/src/components/ProfileBrandingLogo.vue
+++ b/frontend/src/components/ProfileBrandingLogo.vue
@@ -1,22 +1,31 @@
<template>
<div
class="flex justify-center items-center bg-gray-100 rounded-3xl"
- :class="customBrandingLogo ? 'md:px-2 md:py-1.5' : ''"
+ :class="workspaceStore.currentWorkspace?.logo ? (size === 'small' ? 'md:px-1 md:py-0.5' : 'md:px-2 md:py-1.5') : ''"
>
<img
- v-if="customBrandingLogo"
- class="hidden md:block h-6 mr-4 ml-1 bg-no-repeat bg-contain bg-center"
- src="@/assets/logo-full.svg"
+ v-if="workspaceStore.currentWorkspace?.logo"
+ class="hidden md:block h-6 ml-1 bg-no-repeat bg-contain bg-center"
+ :class="size === 'small' ? 'mr-2' : 'mr-4'"
+ :src="logoUrl"
/>
<slot />
</div>
</template>
<script lang="ts" setup>
-import { computed } from "vue";
-import { useActuatorV1Store } from "@/store";
+import defaultLogo from "@/assets/logo-full.svg";
+import { useWorkspaceV1Store } from "@/store";
-const customBrandingLogo = computed((): string | undefined => {
- return useActuatorV1Store().brandingLogo;
-});
+withDefaults(
+ defineProps<{
+ logoUrl?: string;
+ size: "small" | "medium";
+ }>(),
+ {
+ logoUrl: defaultLogo,
+ }
+);
+
+const workspaceStore = useWorkspaceV1Store();
</script>
diff --git a/frontend/src/connect/middlewares/authInterceptorMiddleware.ts b/frontend/src/connect/middlewares/authInterceptorMiddleware.ts
index 413af5e9be..5849a82703 100644
--- a/frontend/src/connect/middlewares/authInterceptorMiddleware.ts
+++ b/frontend/src/connect/middlewares/authInterceptorMiddleware.ts
@@ -62,7 +62,8 @@ export const authInterceptor: Interceptor = (next) => async (req) => {
try {
await refreshTokens();
- } catch {
+ } catch (e) {
+ console.error(e);
handleUnauthenticatedFailure({
silent,
isLoggedIn: authStore.isLoggedIn,
diff --git a/frontend/src/store/modules/v1/actuator.ts b/frontend/src/store/modules/v1/actuator.ts
index f3345ac3d2..a43e474638 100644
--- a/frontend/src/store/modules/v1/actuator.ts
+++ b/frontend/src/store/modules/v1/actuator.ts
@@ -10,10 +10,7 @@ import {
type Release,
type ReleaseInfo,
} from "@/types";
-import type {
- ActuatorInfo,
- ResourcePackage,
-} from "@/types/proto-es/v1/actuator_service_pb";
+import type { ActuatorInfo } from "@/types/proto-es/v1/actuator_service_pb";
import {
STORAGE_KEY_ONBOARDING,
STORAGE_KEY_RELEASE,
@@ -30,7 +27,6 @@ export const useActuatorV1Store = defineStore("actuator_v1", () => {
const initialized = ref(false);
const serverInfo = ref<ActuatorInfo | undefined>(undefined);
const serverInfoTs = ref(0);
- const resourcePackage = ref<ResourcePackage | undefined>(undefined);
const releaseInfo = useLocalStorage<ReleaseInfo>(STORAGE_KEY_RELEASE, {
ignoreRemindModalTillNextRelease: false,
nextCheckTs: 0,
@@ -53,13 +49,6 @@ export const useActuatorV1Store = defineStore("actuator_v1", () => {
const info = computed(() => serverInfo.value);
- const brandingLogo = computed(() => {
- if (!resourcePackage.value?.logo) {
- return "";
- }
- return new TextDecoder().decode(resourcePackage.value?.logo);
- });
-
const version = computed(() => serverInfo.value?.version || "");
const gitCommitBE = computed(() => {
@@ -140,12 +129,6 @@ export const useActuatorV1Store = defineStore("actuator_v1", () => {
return activeUserCount.value <= 1;
});
- const setLogo = (logo: string) => {
- if (resourcePackage.value) {
- resourcePackage.value.logo = new TextEncoder().encode(logo);
- }
- };
-
const setServerInfo = (info: ActuatorInfo) => {
serverInfo.value = info;
serverInfoTs.value = Date.now();
@@ -161,14 +144,8 @@ export const useActuatorV1Store = defineStore("actuator_v1", () => {
};
const fetchServerInfo = async (workspace?: string) => {
- const [info, pkg] = await Promise.all([
- fetchActuatorInfo(workspace),
- actuatorServiceClientConnect.getResourcePackage({
- name: workspace ?? "",
- }),
- ]);
+ const info = await fetchActuatorInfo(workspace);
setServerInfo(info);
- resourcePackage.value = pkg;
return info;
};
@@ -244,14 +221,12 @@ export const useActuatorV1Store = defineStore("actuator_v1", () => {
initialized,
serverInfo,
serverInfoTs,
- resourcePackage,
releaseInfo,
appProfile,
onboardingState,
// Getters
changelogURL,
info,
- brandingLogo,
version,
gitCommitBE,
gitCommitFE,
@@ -269,7 +244,6 @@ export const useActuatorV1Store = defineStore("actuator_v1", () => {
activeUserCount,
// Actions
updateUserStat,
- setLogo,
setServerInfo,
fetchServerInfo,
fetchLatestRelease,
diff --git a/frontend/src/store/modules/v1/workspace.ts b/frontend/src/store/modules/v1/workspace.ts
index 48e297babc..d10d48636d 100644
--- a/frontend/src/store/modules/v1/workspace.ts
+++ b/frontend/src/store/modules/v1/workspace.ts
@@ -1,12 +1,13 @@
import { create } from "@bufbuild/protobuf";
+import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";
import { cloneDeep } from "lodash-es";
import { defineStore } from "pinia";
-import { computed, ref } from "vue";
+import { computed, ref, watch } from "vue";
import {
authServiceClientConnect,
workspaceServiceClientConnect,
} from "@/connect";
-import { userNamePrefix } from "@/store/modules/v1/common";
+import { userNamePrefix, workspaceNamePrefix } from "@/store/modules/v1/common";
import { ALL_USERS_USER_EMAIL } from "@/types";
import { SwitchWorkspaceRequestSchema } from "@/types/proto-es/v1/auth_service_pb";
import type { IamPolicy } from "@/types/proto-es/v1/iam_policy_pb";
@@ -17,6 +18,7 @@ import {
SetIamPolicyRequestSchema,
} from "@/types/proto-es/v1/iam_policy_pb";
import type { Workspace } from "@/types/proto-es/v1/workspace_service_pb";
+import { UpdateWorkspaceRequestSchema } from "@/types/proto-es/v1/workspace_service_pb";
import { getUserListInBinding, isBindingPolicyExpired } from "@/utils";
import { useActuatorV1Store } from "./actuator";
import { composePolicyBindings } from "./projectIamPolicy";
@@ -31,11 +33,46 @@ workspaceSwitchChannel.onmessage = () => {
export const useWorkspaceV1Store = defineStore("workspace_v1", () => {
const _workspaceIamPolicy = ref<IamPolicy>(create(IamPolicySchema, {}));
const workspaceList = ref<Workspace[]>([]);
+ const currentWorkspace = ref<Workspace | undefined>();
+ const actuatorStore = useActuatorV1Store();
const workspaceIamPolicy = computed(() => {
return _workspaceIamPolicy.value;
});
+ watch(
+ () => actuatorStore.workspaceResourceName,
+ async (name) => {
+ const requestName = name || `${workspaceNamePrefix}-`;
+ const workspace = await workspaceServiceClientConnect.getWorkspace({
+ name: requestName,
+ });
+ currentWorkspace.value = workspace;
+ },
+ { immediate: true }
+ );
+
+ const updateWorkspace = async (
+ workspace: Workspace,
+ updateMask: string[]
+ ) => {
+ const updated = await workspaceServiceClientConnect.updateWorkspace(
+ create(UpdateWorkspaceRequestSchema, {
+ workspace: workspace,
+ updateMask: create(FieldMaskSchema, {
+ paths: updateMask,
+ }),
+ })
+ );
+ const index = workspaceList.value.findIndex(
+ (ws) => ws.name === updated.name
+ );
+ if (index >= 0) {
+ workspaceList.value[index] = updated;
+ }
+ currentWorkspace.value = updated;
+ };
+
// roleMapToUsers returns Map<roles/{role}, Set<userfullname>>
// the user fullname can be
// - users/{email}, includes users/ALL_USERS_USER_EMAIL
@@ -80,7 +117,7 @@ export const useWorkspaceV1Store = defineStore("workspace_v1", () => {
const fetchIamPolicy = async () => {
const request = create(GetIamPolicyRequestSchema, {
- resource: useActuatorV1Store().workspaceResourceName,
+ resource: actuatorStore.workspaceResourceName,
});
const policy = await workspaceServiceClientConnect.getIamPolicy(request);
await composePolicyBindings(policy.bindings);
@@ -145,7 +182,7 @@ export const useWorkspaceV1Store = defineStore("workspace_v1", () => {
}
const request = create(SetIamPolicyRequestSchema, {
- resource: useActuatorV1Store().workspaceResourceName,
+ resource: actuatorStore.workspaceResourceName,
policy: workspacePolicy,
etag: workspacePolicy.etag,
});
@@ -178,11 +215,6 @@ export const useWorkspaceV1Store = defineStore("workspace_v1", () => {
return specificRoles;
};
- const currentWorkspace = computed(() => {
- const currentName = useActuatorV1Store().workspaceResourceName;
- return workspaceList.value.find((ws) => ws.name === currentName);
- });
-
const fetchWorkspaceList = async () => {
const resp = await workspaceServiceClientConnect.listWorkspaces({});
workspaceList.value = resp.workspaces;
@@ -211,6 +243,7 @@ export const useWorkspaceV1Store = defineStore("workspace_v1", () => {
getWorkspaceRolesByName,
workspaceList,
currentWorkspace,
+ updateWorkspace,
fetchWorkspaceList,
switchWorkspace,
};
diff --git a/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts b/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts
index 03d5b2be69..552e0a8d1c 100644
--- a/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts
@@ -12,47 +12,6 @@ import type { EmptySchema, Timestamp } from "@bufbuild/protobuf/wkt";
*/
export declare const file_v1_actuator_service: GenFile;
-/**
- * Request message for getting branding resources.
- *
- * @generated from message bytebase.v1.GetResourcePackageRequest
- */
-export declare type GetResourcePackageRequest = Message<"bytebase.v1.GetResourcePackageRequest"> & {
- /**
- * Optional workspace name, format: workspaces/{workspace}.
- * Set when using the workspace-scoped URL pattern.
- *
- * @generated from field: string name = 1;
- */
- name: string;
-};
-
-/**
- * Describes the message bytebase.v1.GetResourcePackageRequest.
- * Use `create(GetResourcePackageRequestSchema)` to create a new message.
- */
-export declare const GetResourcePackageRequestSchema: GenMessage<GetResourcePackageRequest>;
-
-/**
- * Custom branding resources for the Bytebase instance.
- *
- * @generated from message bytebase.v1.ResourcePackage
- */
-export declare type ResourcePackage = Message<"bytebase.v1.ResourcePackage"> & {
- /**
- * The branding logo.
- *
- * @generated from field: bytes logo = 1;
- */
- logo: Uint8Array;
-};
-
-/**
- * Describes the message bytebase.v1.ResourcePackage.
- * Use `create(ResourcePackageSchema)` to create a new message.
- */
-export declare const ResourcePackageSchema: GenMessage<ResourcePackage>;
-
/**
* Request message for setting up sample data.
*
@@ -340,17 +299,6 @@ export declare const ActuatorService: GenService<{
input: typeof DeleteCacheRequestSchema;
output: typeof EmptySchema;
},
- /**
- * Gets custom branding resources such as logos.
- * Permissions required: None
- *
- * @generated from rpc bytebase.v1.ActuatorService.GetResourcePackage
- */
- getResourcePackage: {
- methodKind: "unary";
- input: typeof GetResourcePackageRequestSchema;
- output: typeof ResourcePackageSchema;
- },
/**
* Gets workspace-scoped actuator info. Requires authentication.
*
diff --git a/frontend/src/types/proto-es/v1/actuator_service_pb.js b/frontend/src/types/proto-es/v1/actuator_service_pb.js
index 63a4e13e3f..494281ed71 100644
--- a/frontend/src/types/proto-es/v1/actuator_service_pb.js
+++ b/frontend/src/types/proto-es/v1/actuator_service_pb.js
@@ -15,63 +15,49 @@ import { file_v1_setting_service } from "./setting_service_pb";
* Describes the file v1/actuator_service.proto.
*/
export const file_v1_actuator_service = /*@__PURE__*/
- fileDesc("Chl2MS9hY3R1YXRvcl9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSIpChlHZXRSZXNvdXJjZVBhY2thZ2VSZXF1ZXN0EgwKBG5hbWUYASABKAkiHwoPUmVzb3VyY2VQYWNrYWdlEgwKBGxvZ28YASABKAwiFAoSU2V0dXBTYW1wbGVSZXF1ZXN0IhgKFkdldEFjdHVhdG9ySW5mb1JlcXVlc3QiTwofR2V0V29ya3NwYWNlQWN0dWF0b3JJbmZvUmVxdWVzdBIsCgRuYW1lGAEgASgJQh7gQQL6QRgKFmJ5dGViYXNlLmNvbS9Xb3Jrc3BhY2UiFAoSRGVsZXRlQ2FjaGVSZXF1ZXN0Iq8BCgtSZXN0cmljdGlvbhIcCg9kaXNhbGxvd19zaWdudXAYASABKAhCA+BBAxIlChhkaXNhbGxvd19wYXNzd29yZF9zaWduaW4YAiABKAhCA+BBAxJbChRwYXNzd29yZF9yZXN0cmljdGlvbhgDIAEoCzI4LmJ5dGViYXNlLnYxLldvcmtzcGFjZVByb2ZpbGVTZXR0aW5nLlBhc3N3b3JkUmVzdHJpY3Rpb25CA+BBAyKFBQoMQWN0dWF0b3JJbmZvEhQKB3ZlcnNpb24YASABKAlCA+BBAxIXCgpnaXRfY29tbWl0GAIgASgJQgPgQQMSFQoIcmVhZG9ubHkYAyABKAhCA+BBAxIRCgRzYWFzGAQgASgIQgPgQQMSEQoEZGVtbxgFIAEoCEID4EEDEhEKBGhvc3QYBiABKAlCA+BBAxIRCgRwb3J0GAcgASgJQgPgQQMSGQoMZXh0ZXJuYWxfdXJsGAggASgJQgPgQQMSOQoQbGFzdF9hY3RpdmVfdGltZRgLIAEoC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L2NhY2hlEq8BChJHZXRSZXNvdXJjZVBhY2thZ2USJi5ieXRlYmFzZS52MS5HZXRSZXNvdXJjZVBhY2thZ2VSZXF1ZXN0GhwuYnl0ZWJhc2UudjEuUmVzb3VyY2VQYWNrYWdlIlPaQQCA6jABgtPkkwJGWiwSKi92MS97bmFtZT13b3Jrc3BhY2VzLyp9L2FjdHVhdG9yL3Jlc291cmNlcxIWL3YxL2FjdHVhdG9yL3Jlc291cmNlcxLAAQoYR2V0V29ya3NwYWNlQWN0dWF0b3JJbmZvEiwuYnl0ZWJhc2UudjEuR2V0V29ya3NwYWNlQWN0dWF0b3JJbmZvUmVxdWVzdBoZLmJ5dGViYXNlLnYxLkFjdHVhdG9ySW5mbyJb2kEEbmFtZYrqMB9iYi5zZXR0aW5ncy5nZXRXb3Jrc3BhY2VQcm9maWxlkOowAYLT5JMCJxIlL3YxL3tuYW1lPXdvcmtzcGFjZXMvKn0vYWN0dWF0b3IvaW5mb0KqAQoPY29tLmJ5dGViYXNlLnYxQhRBY3R1YXRvclNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_timestamp, file_v1_annotation, file_v1_setting_service]);
-
-/**
- * Describes the message bytebase.v1.GetResourcePackageRequest.
- * Use `create(GetResourcePackageRequestSchema)` to create a new message.
- */
-export const GetResourcePackageRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_actuator_service, 0);
-
-/**
- * Describes the message bytebase.v1.ResourcePackage.
- * Use `create(ResourcePackageSchema)` to create a new message.
- */
-export const ResourcePackageSchema = /*@__PURE__*/
- messageDesc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Zm9CqgEKD2NvbS5ieXRlYmFzZS52MUIUQWN0dWF0b3JTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_timestamp, file_v1_annotation, file_v1_setting_service]);
/**
* Describes the message bytebase.v1.SetupSampleRequest.
* Use `create(SetupSampleRequestSchema)` to create a new message.
*/
export const SetupSampleRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_actuator_service, 2);
+ messageDesc(file_v1_actuator_service, 0);
/**
* Describes the message bytebase.v1.GetActuatorInfoRequest.
* Use `create(GetActuatorInfoRequestSchema)` to create a new message.
*/
export const GetActuatorInfoRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_actuator_service, 3);
+ messageDesc(file_v1_actuator_service, 1);
/**
* Describes the message bytebase.v1.GetWorkspaceActuatorInfoRequest.
* Use `create(GetWorkspaceActuatorInfoRequestSchema)` to create a new message.
*/
export const GetWorkspaceActuatorInfoRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_actuator_service, 4);
+ messageDesc(file_v1_actuator_service, 2);
/**
* Describes the message bytebase.v1.DeleteCacheRequest.
* Use `create(DeleteCacheRequestSchema)` to create a new message.
*/
export const DeleteCacheRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_actuator_service, 5);
+ messageDesc(file_v1_actuator_service, 3);
/**
* Describes the message bytebase.v1.Restriction.
* Use `create(RestrictionSchema)` to create a new message.
*/
export const RestrictionSchema = /*@__PURE__*/
- messageDesc(file_v1_actuator_service, 6);
+ messageDesc(file_v1_actuator_service, 4);
/**
* Describes the message bytebase.v1.ActuatorInfo.
* Use `create(ActuatorInfoSchema)` to create a new message.
*/
export const ActuatorInfoSchema = /*@__PURE__*/
- messageDesc(file_v1_actuator_service, 7);
+ messageDesc(file_v1_actuator_service, 5);
/**
* ActuatorService manages system health and operational information.
diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.d.ts b/frontend/src/types/proto-es/v1/setting_service_pb.d.ts
index 7bdf263786..1470f08f78 100644
--- a/frontend/src/types/proto-es/v1/setting_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/setting_service_pb.d.ts
@@ -585,13 +585,6 @@ export declare type WorkspaceProfileSetting = Message<"bytebase.v1.WorkspaceProf
*/
directorySyncToken: string;
- /**
- * The branding logo as a data URI (e.g. data:image/png;base64,...).
- *
- * @generated from field: string branding_logo = 16;
- */
- brandingLogo: string;
-
/**
* Password restriction settings.
*
diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.js b/frontend/src/types/proto-es/v1/setting_service_pb.js
index 8bc295dd16..73ca24b6a0 100644
--- a/frontend/src/types/proto-es/v1/setting_service_pb.js
+++ b/frontend/src/types/proto-es/v1/setting_service_pb.js
@@ -17,7 +17,7 @@ import { file_v1_issue_service } from "./issue_service_pb";
* Describes the file v1/setting_service.proto.
*/
export const file_v1_setting_service = /*@__PURE__*/
- fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0U2V0dGluZ1Jlc3BvbnNlEiUKB3NldHRpbmcYASABKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIqEBChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIqCgdzZXR0aW5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Z1JlcXVlc3QaFC5ieXRlYmFzZS52MS5TZXR0aW5nIjvaQQRuYW1liuowD2JiLnNldHRpbmdzLmdldJDqMAKC0+STAhcSFS92MS97bmFtZT1zZXR0aW5ncy8qfRKTAQoNVXBkYXRlU2V0dGluZxIhLmJ5dGViYXNlLnYxLlVwZGF0ZVNldHRpbmdSZXF1ZXN0GhQuYnl0ZWJhc2UudjEuU2V0dGluZyJJiuowD2JiLnNldHRpbmdzLnNldJDqMAKY6jABgtPkkwIoOgdzZXR0aW5nMh0vdjEve3NldHRpbmcubmFtZT1zZXR0aW5ncy8qfUKpAQoPY29tLmJ5dGViYXNlLnYxQhNTZXR0aW5nU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_issue_service]);
+ fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0U2V0dGluZ1Jlc3BvbnNlEiUKB3NldHRpbmcYASABKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIqEBChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIqCgdzZXR0aW5nG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pbmdSZXF1ZXN0GhQuYnl0ZWJhc2UudjEuU2V0dGluZyI72kEEbmFtZYrqMA9iYi5zZXR0aW5ncy5nZXSQ6jACgtPkkwIXEhUvdjEve25hbWU9c2V0dGluZ3MvKn0SkwEKDVVwZGF0ZVNldHRpbmcSIS5ieXRlYmFzZS52MS5VcGRhdGVTZXR0aW5nUmVxdWVzdBoULmJ5dGViYXNlLnYxLlNldHRpbmciSYrqMA9iYi5zZXR0aW5ncy5zZXSQ6jACmOowAYLT5JMCKDoHc2V0dGluZzIdL3YxL3tzZXR0aW5nLm5hbWU9c2V0dGluZ3MvKn1CqQEKD2NvbS5ieXRlYmFzZS52MUITU2V0dGluZ1NlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_issue_service]);
/**
* Describes the message bytebase.v1.ListSettingsRequest.
diff --git a/frontend/src/types/proto-es/v1/workspace_service_pb.d.ts b/frontend/src/types/proto-es/v1/workspace_service_pb.d.ts
index 8b212c9f97..54093a3ed9 100644
--- a/frontend/src/types/proto-es/v1/workspace_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/workspace_service_pb.d.ts
@@ -40,6 +40,25 @@ export declare type ListWorkspacesResponse = Message<"bytebase.v1.ListWorkspaces
*/
export declare const ListWorkspacesResponseSchema: GenMessage<ListWorkspacesResponse>;
+/**
+ * @generated from message bytebase.v1.GetWorkspaceRequest
+ */
+export declare type GetWorkspaceRequest = Message<"bytebase.v1.GetWorkspaceRequest"> & {
+ /**
+ * The workspace name, format: workspaces/{workspace}.
+ * Use "workspaces/-" to get the current/default workspace.
+ *
+ * @generated from field: string name = 1;
+ */
+ name: string;
+};
+
+/**
+ * Describes the message bytebase.v1.GetWorkspaceRequest.
+ * Use `create(GetWorkspaceRequestSchema)` to create a new message.
+ */
+export declare const GetWorkspaceRequestSchema: GenMessage<GetWorkspaceRequest>;
+
/**
* @generated from message bytebase.v1.Workspace
*/
@@ -55,6 +74,13 @@ export declare type Workspace = Message<"bytebase.v1.Workspace"> & {
* @generated from field: string title = 2;
*/
title: string;
+
+ /**
+ * The branding logo.
+ *
+ * @generated from field: string logo = 3;
+ */
+ logo: string;
};
/**
@@ -90,6 +116,20 @@ export declare const UpdateWorkspaceRequestSchema: GenMessage<UpdateWorkspaceReq
* @generated from service bytebase.v1.WorkspaceService
*/
export declare const WorkspaceService: GenService<{
+ /**
+ * Gets a workspace by name.
+ * Supports "workspaces/-" to resolve the current workspace:
+ * - Authenticated: uses the workspace from JWT context
+ * - Self-hosted unauthenticated: returns the single workspace
+ * - SaaS unauthenticated: returns minimal response
+ *
+ * @generated from rpc bytebase.v1.WorkspaceService.GetWorkspace
+ */
+ getWorkspace: {
+ methodKind: "unary";
+ input: typeof GetWorkspaceRequestSchema;
+ output: typeof WorkspaceSchema;
+ },
/**
* Lists all workspaces the current user is a member of.
*
diff --git a/frontend/src/types/proto-es/v1/workspace_service_pb.js b/frontend/src/types/proto-es/v1/workspace_service_pb.js
index 24a12e71ed..d554db7b98 100644
--- a/frontend/src/types/proto-es/v1/workspace_service_pb.js
+++ b/frontend/src/types/proto-es/v1/workspace_service_pb.js
@@ -13,7 +13,7 @@ import { file_v1_iam_policy } from "./iam_policy_pb";
* Describes the file v1/workspace_service.proto.
*/
export const file_v1_workspace_service = /*@__PURE__*/
- fileDesc("Chp2MS93b3Jrc3BhY2Vfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiFwoVTGlzdFdvcmtzcGFjZXNSZXF1ZXN0IkQKFkxpc3RXb3Jrc3Bh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xpY3mQ6jABmOowAYLT5JMCLToBKiIoL3YxL3tyZXNvdXJjZT13b3Jrc3BhY2VzLyp9OnNldElhbVBvbGljeUKrAQoPY29tLmJ5dGViYXNlLnYxQhVXb3Jrc3BhY2VTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_field_behavior, file_google_protobuf_field_mask, file_v1_annotation, file_v1_iam_policy]);
+ fileDesc("Chp2MS93b3Jrc3BhY2Vfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiFwoVTGlzdFdvcmtzcGFjZXNSZXF1ZXN0IkQKFkxpc3RXb3Jrc3BhY2VzUmVzcG9uc2USKgoKd29ya3NwYWNlcxgBIAMoCzIWLmJ5dGViYXNlLnYxLldvcmtzcGFjZSIjChNHZXRXb3Jrc3BhY2VSZXF1ZXN0EgwKBG5hbWUYASABKAkiNgoJV29ya3NwYWNlEgwKBG5hbWUYASABKAkSDQoFdGl0bGUYAiABKAkSDAoEbG9nbxgDIAEoCSJ5ChZVcGRhdGVXb3Jrc3BhY2VSZXF1ZXN0Ei4KCXdvcmtzcGFjZRgBIAEoCzIWLmJ5dGViYXNlLnYxLldvcmtzcGFjZUID4EECEi8KC3VwZGF0ZV9tYXNrGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLkZpZWxkTWFzazLcBQoQV29ya3NwYWNlU2VydmljZRJtCgxHZXRXb3Jrc3BhY2USIC5ieXRlYmFzZS52MS5HZXRXb3Jrc3BhY2VSZXF1ZXN0GhYuYnl0ZWJhc2UudjEuV29ya3NwYWNlIiOA6jABgtPkkwIZEhcvdjEve25hbWU9d29ya3NwYWNlcy8qfRJ1Cg5MaX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api_annotations, file_google_api_field_behavior, file_google_protobuf_field_mask, file_v1_annotation, file_v1_iam_policy]);
/**
* Describes the message bytebase.v1.ListWorkspacesRequest.
@@ -29,19 +29,26 @@ export const ListWorkspacesRequestSchema = /*@__PURE__*/
export const ListWorkspacesResponseSchema = /*@__PURE__*/
messageDesc(file_v1_workspace_service, 1);
+/**
+ * Describes the message bytebase.v1.GetWorkspaceRequest.
+ * Use `create(GetWorkspaceRequestSchema)` to create a new message.
+ */
+export const GetWorkspaceRequestSchema = /*@__PURE__*/
+ messageDesc(file_v1_workspace_service, 2);
+
/**
* Describes the message bytebase.v1.Workspace.
* Use `create(WorkspaceSchema)` to create a new message.
*/
export const WorkspaceSchema = /*@__PURE__*/
- messageDesc(file_v1_workspace_service, 2);
+ messageDesc(file_v1_workspace_service, 3);
/**
* Describes the message bytebase.v1.UpdateWorkspaceRequest.
* Use `create(UpdateWorkspaceRequestSchema)` to create a new message.
*/
export const UpdateWorkspaceRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_workspace_service, 3);
+ messageDesc(file_v1_workspace_service, 4);
/**
* WorkspaceService manages workspace-level operations and profile.
diff --git a/frontend/src/views/DashboardHeader.vue b/frontend/src/views/DashboardHeader.vue
index e15e1c63f1..9333dfa386 100644
--- a/frontend/src/views/DashboardHeader.vue
+++ b/frontend/src/views/DashboardHeader.vue
@@ -60,7 +60,7 @@
</NButton>
</router-link>
- <ProfileBrandingLogo>
+ <ProfileBrandingLogo size="medium">
<ProfileDropdown :link="true" />
</ProfileBrandingLogo>
</div>
diff --git a/frontend/src/views/sql-editor/TabList/BrandingLogoWrapper.vue b/frontend/src/views/sql-editor/TabList/BrandingLogoWrapper.vue
deleted file mode 100644
index 8f4e284742..0000000000
--- a/frontend/src/views/sql-editor/TabList/BrandingLogoWrapper.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-<template>
- <div
- class="flex justify-center items-center bg-gray-100 rounded-3xl"
- :class="customBrandingLogo ? 'md:px-1 md:py-0.5' : ''"
- >
- <img
- v-if="customBrandingLogo"
- class="hidden md:block h-6 mr-2 ml-1 bg-no-repeat bg-contain bg-center"
- :src="customBrandingLogo"
- />
- <slot />
- </div>
-</template>
-
-<script lang="ts" setup>
-import { computed } from "vue";
-import { useActuatorV1Store } from "@/store";
-
-const customBrandingLogo = computed((): string | undefined => {
- return useActuatorV1Store().brandingLogo;
-});
-</script>
diff --git a/frontend/src/views/sql-editor/TabList/TabList.vue b/frontend/src/views/sql-editor/TabList/TabList.vue
index 0901f0edb9..af9c1b4fc4 100644
--- a/frontend/src/views/sql-editor/TabList/TabList.vue
+++ b/frontend/src/views/sql-editor/TabList/TabList.vue
@@ -49,11 +49,12 @@
</div>
</NScrollbar>
- <div class="flex items-center gap-2">
- <BrandingLogoWrapper>
- <ProfileDropdown :link="true" />
- </BrandingLogoWrapper>
- </div>
+ <ProfileBrandingLogo
+ size="small"
+ :logo-url="workspaceStore.currentWorkspace?.logo"
+ >
+ <ProfileDropdown :link="true" />
+ </ProfileBrandingLogo>
<ContextMenu ref="contextMenuRef" />
</div>
@@ -67,13 +68,13 @@ import scrollIntoView from "scroll-into-view-if-needed";
import { computed, nextTick, onMounted, reactive, ref, watch } from "vue";
import { VueDraggable } from "vue-draggable-plus";
import { useI18n } from "vue-i18n";
+import ProfileBrandingLogo from "@/components/ProfileBrandingLogo.vue";
import ProfileDropdown from "@/components/ProfileDropdown.vue";
import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
-import { useSQLEditorTabStore } from "@/store";
+import { useSQLEditorTabStore, useWorkspaceV1Store } from "@/store";
import type { SQLEditorTab } from "@/types";
import { defer, usePreventBackAndForward } from "@/utils";
import { useSQLEditorContext } from "../context";
-import BrandingLogoWrapper from "./BrandingLogoWrapper.vue";
import ContextMenu from "./ContextMenu.vue";
import { useTabListContext } from "./context";
import TabItem from "./TabItem/TabItem.vue";
@@ -86,6 +87,7 @@ type LocalState = {
const tabStore = useSQLEditorTabStore();
const editorContext = useSQLEditorContext();
const context = useTabListContext();
+const workspaceStore = useWorkspaceV1Store();
const { t } = useI18n();
const dialog = useDialog();
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index d404740d2c..c357506e90 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -33,34 +33,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ActuatorInfo'
- /v1/actuator/resources:
- get:
- tags:
- - ActuatorService
- summary: GetResourcePackage
- description: |-
- Gets custom branding resources such as logos.
- Permissions required: None
- operationId: ActuatorService_GetResourcePackage
- parameters:
- - name: name
- in: query
- description: |-
- Optional workspace name, format: workspaces/{workspace}.
- Set when using the workspace-scoped URL pattern.
- schema:
- type: string
- title: name
- description: |-
- Optional workspace name, format: workspaces/{workspace}.
- Set when using the workspace-scoped URL pattern.
- responses:
- "200":
- description: Success
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.ResourcePackage'
/v1/actuator:setupSample:
post:
tags:
@@ -15086,6 +15058,31 @@ paths:
schema:
$ref: '#/components/schemas/bytebase.v1.ListWorkspacesResponse'
/v1/workspaces/{workspace}:
+ get:
+ tags:
+ - WorkspaceService
+ summary: GetWorkspace
+ description: |-
+ Gets a workspace by name.
+ Supports "workspaces/-" to resolve the current workspace:
+ - Authenticated: uses the workspace from JWT context
+ - Self-hosted unauthenticated: returns the single workspace
+ - SaaS unauthenticated: returns minimal response
+ operationId: WorkspaceService_GetWorkspace
+ parameters:
+ - name: workspace
+ in: path
+ description: The workspace id.
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.Workspace'
patch:
tags:
- WorkspaceService
@@ -15144,29 +15141,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ActuatorInfo'
- /v1/workspaces/{workspace}/actuator/resources:
- get:
- tags:
- - ActuatorService
- summary: GetResourcePackage
- description: |-
- Gets custom branding resources such as logos.
- Permissions required: None
- operationId: ActuatorService_GetResourcePackage2
- parameters:
- - name: workspace
- in: path
- description: The workspace id.
- required: true
- schema:
- type: string
- responses:
- "200":
- description: Success
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/bytebase.v1.ResourcePackage'
/v1/workspaces/{workspace}/databases:
get:
tags:
@@ -20459,18 +20433,6 @@ components:
required:
- name
additionalProperties: false
- bytebase.v1.GetResourcePackageRequest:
- type: object
- properties:
- name:
- type: string
- title: name
- description: |-
- Optional workspace name, format: workspaces/{workspace}.
- Set when using the workspace-scoped URL pattern.
- title: GetResourcePackageRequest
- additionalProperties: false
- description: Request message for getting branding resources.
bytebase.v1.GetReviewConfigRequest:
type: object
properties:
@@ -20716,6 +20678,17 @@ components:
- name
additionalProperties: false
description: Request message for getting workspace-scoped actuator information.
+ bytebase.v1.GetWorkspaceRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The workspace name, format: workspaces/{workspace}.
+ Use "workspaces/-" to get the current/default workspace.
+ title: GetWorkspaceRequest
+ additionalProperties: false
bytebase.v1.GridLevel:
type: object
properties:
@@ -24791,17 +24764,6 @@ components:
title: RequestMetadata
additionalProperties: false
description: Metadata about the incoming request.
- bytebase.v1.ResourcePackage:
- type: object
- properties:
- logo:
- type: string
- title: logo
- format: byte
- description: The branding logo.
- title: ResourcePackage
- additionalProperties: false
- description: Custom branding resources for the Bytebase instance.
bytebase.v1.Restriction:
type: object
properties:
@@ -28940,6 +28902,10 @@ components:
title:
type: string
title: title
+ logo:
+ type: string
+ title: logo
+ description: The branding logo.
title: Workspace
additionalProperties: false
bytebase.v1.WorkspaceApprovalSetting:
@@ -29074,10 +29040,6 @@ components:
type: string
title: directory_sync_token
description: The token for directory sync authentication.
- brandingLogo:
- type: string
- title: branding_logo
- description: The branding logo as a data URI (e.g. data:image/png;base64,...).
passwordRestriction:
title: password_restriction
description: Password restriction settings.
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index e31cf5c1ce..64932a2548 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -331,6 +331,9 @@
- [store/worksheet.proto](#store_worksheet-proto)
- [WorkSheetOrganizerPayload](#bytebase-store-WorkSheetOrganizerPayload)
+- [store/workspace.proto](#store_workspace-proto)
+ - [WorkspacePayload](#bytebase-store-WorkspacePayload)
+
- [Scalar Value Types](#scalar-value-types)
@@ -4501,7 +4504,6 @@ All other settings live in per-workspace WORKSPACE_PROFILE.
| enable_audit_log_stdout | [bool](#bool) | | Whether to enable audit logging to stdout in structured JSON format. Requires TEAM or ENTERPRISE license. |
| watermark | [bool](#bool) | | Whether to display watermark on pages. Requires ENTERPRISE license. |
| directory_sync_token | [string](#string) | | The token for directory sync authentication. |
-| branding_logo | [string](#string) | | The branding logo as a data URI (e.g. data:image/png;base64,...). |
| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-store-WorkspaceProfileSetting-PasswordRestriction) | | Password restriction settings. |
| access_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for access token. Default is 1 hour. |
| enable_debug | [bool](#bool) | | Whether debug mode is enabled. |
@@ -5303,6 +5305,38 @@ ProviderType identifies the CI/CD platform.
+<a name="store_workspace-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## store/workspace.proto
+
+
+
+<a name="bytebase-store-WorkspacePayload"></a>
+
+### WorkspacePayload
+WorkspacePayload stores workspace-level metadata.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| title | [string](#string) | | |
+| logo | [string](#string) | | |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
## Scalar Value Types
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index f063623d29..e5e8559149 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -1498,6 +1498,21 @@
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#store%2fworkspace.proto">store/workspace.proto</a>
+ <ul>
+
+ <li>
+ <a href="#bytebase.store.WorkspacePayload"><span class="badge">M</span>WorkspacePayload</a>
+ </li>
+
+
+
+
</ul>
</li>
@@ -12330,13 +12345,6 @@ Requires ENTERPRISE license. </p></td>
<td><p>The token for directory sync authentication. </p></td>
</tr>
- <tr>
- <td>branding_logo</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The branding logo as a data URI (e.g. data:image/png;base64,...). </p></td>
- </tr>
-
<tr>
<td>password_restriction</td>
<td><a href="#bytebase.store.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>
@@ -14087,6 +14095,51 @@ For example, if the folders is [A, B, C], means the worksheet is in the A/B/C su
+
+ <div class="file-heading">
+ <h2 id="store/workspace.proto">store/workspace.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.WorkspacePayload">WorkspacePayload</h3>
+ <p>WorkspacePayload stores workspace-level metadata.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>title</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>logo</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+
+
+
+
+
<h2 id="scalar-value-types">Scalar Value Types</h2>
<table class="scalar-value-types-table">
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 1d29d78cf1..04a84a39a3 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -126,9 +126,7 @@
- [ActuatorInfo](#bytebase-v1-ActuatorInfo)
- [DeleteCacheRequest](#bytebase-v1-DeleteCacheRequest)
- [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest)
- - [GetResourcePackageRequest](#bytebase-v1-GetResourcePackageRequest)
- [GetWorkspaceActuatorInfoRequest](#bytebase-v1-GetWorkspaceActuatorInfoRequest)
- - [ResourcePackage](#bytebase-v1-ResourcePackage)
- [Restriction](#bytebase-v1-Restriction)
- [SetupSampleRequest](#bytebase-v1-SetupSampleRequest)
@@ -714,6 +712,7 @@
- [WorksheetService](#bytebase-v1-WorksheetService)
- [v1/workspace_service.proto](#v1_workspace_service-proto)
+ - [GetWorkspaceRequest](#bytebase-v1-GetWorkspaceRequest)
- [ListWorkspacesRequest](#bytebase-v1-ListWorkspacesRequest)
- [ListWorkspacesResponse](#bytebase-v1-ListWorkspacesResponse)
- [UpdateWorkspaceRequest](#bytebase-v1-UpdateWorkspaceRequest)
@@ -2387,7 +2386,6 @@ For examples: resource.environment_id == &#34;prod&#34; &amp;&amp; statement.aff
| enable_audit_log_stdout | [bool](#bool) | | Whether to enable audit logging to stdout in structured JSON format. Requires TEAM or ENTERPRISE license. |
| watermark | [bool](#bool) | | Whether to display watermark on pages. Requires ENTERPRISE license. |
| directory_sync_token | [string](#string) | | The token for directory sync authentication. |
-| branding_logo | [string](#string) | | The branding logo as a data URI (e.g. data:image/png;base64,...). |
| password_restriction | [WorkspaceProfileSetting.PasswordRestriction](#bytebase-v1-WorkspaceProfileSetting-PasswordRestriction) | | Password restriction settings. |
| access_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for access token. Default is 1 hour. |
| enable_debug | [bool](#bool) | | Whether debug mode is enabled. |
@@ -2592,21 +2590,6 @@ Request message for getting actuator information.
-<a name="bytebase-v1-GetResourcePackageRequest"></a>
-
-### GetResourcePackageRequest
-Request message for getting branding resources.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | Optional workspace name, format: workspaces/{workspace}. Set when using the workspace-scoped URL pattern. |
-
-
-
-
-
-
<a name="bytebase-v1-GetWorkspaceActuatorInfoRequest"></a>
### GetWorkspaceActuatorInfoRequest
@@ -2622,21 +2605,6 @@ Request message for getting workspace-scoped actuator information.
-<a name="bytebase-v1-ResourcePackage"></a>
-
-### ResourcePackage
-Custom branding resources for the Bytebase instance.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| logo | [bytes](#bytes) | | The branding logo. |
-
-
-
-
-
-
<a name="bytebase-v1-Restriction"></a>
### Restriction
@@ -2680,7 +2648,6 @@ ActuatorService manages system health and operational information.
| GetActuatorInfo | [GetActuatorInfoRequest](#bytebase-v1-GetActuatorInfoRequest) | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | Gets system information and health status of the Bytebase instance. Permissions required: None |
| SetupSample | [SetupSampleRequest](#bytebase-v1-SetupSampleRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sets up sample data for demonstration and testing purposes. Permissions required: bb.projects.create |
| DeleteCache | [DeleteCacheRequest](#bytebase-v1-DeleteCacheRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Clears the system cache to force data refresh. Permissions required: None |
-| GetResourcePackage | [GetResourcePackageRequest](#bytebase-v1-GetResourcePackageRequest) | [ResourcePackage](#bytebase-v1-ResourcePackage) | Gets custom branding resources such as logos. Permissions required: None |
| GetWorkspaceActuatorInfo | [GetWorkspaceActuatorInfoRequest](#bytebase-v1-GetWorkspaceActuatorInfoRequest) | [ActuatorInfo](#bytebase-v1-ActuatorInfo) | Gets workspace-scoped actuator info. Requires authentication. |
@@ -11483,6 +11450,21 @@ WorksheetService manages SQL worksheets for query development.
+<a name="bytebase-v1-GetWorkspaceRequest"></a>
+
+### GetWorkspaceRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The workspace name, format: workspaces/{workspace}. Use &#34;workspaces/-&#34; to get the current/default workspace. |
+
+
+
+
+
+
<a name="bytebase-v1-ListWorkspacesRequest"></a>
### ListWorkspacesRequest
@@ -11534,6 +11516,7 @@ WorksheetService manages SQL worksheets for query development.
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | Format: workspaces/{workspace} |
| title | [string](#string) | | |
+| logo | [string](#string) | | The branding logo. |
@@ -11553,6 +11536,7 @@ WorkspaceService manages workspace-level operations and profile.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
+| GetWorkspace | [GetWorkspaceRequest](#bytebase-v1-GetWorkspaceRequest) | [Workspace](#bytebase-v1-Workspace) | Gets a workspace by name. Supports &#34;workspaces/-&#34; to resolve the current workspace: - Authenticated: uses the workspace from JWT context - Self-hosted unauthenticated: returns the single workspace - SaaS unauthenticated: returns minimal response |
| ListWorkspaces | [ListWorkspacesRequest](#bytebase-v1-ListWorkspacesRequest) | [ListWorkspacesResponse](#bytebase-v1-ListWorkspacesResponse) | Lists all workspaces the current user is a member of. |
| UpdateWorkspace | [UpdateWorkspaceRequest](#bytebase-v1-UpdateWorkspaceRequest) | [Workspace](#bytebase-v1-Workspace) | Updates a workspace. Currently only title can be updated. |
| GetIamPolicy | [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest) | [IamPolicy](#bytebase-v1-IamPolicy) | Retrieves IAM policy for the workspace. Permissions required: bb.workspaces.getIamPolicy |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 2493b4ee1d..1c7809c17e 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -649,18 +649,10 @@
<a href="#bytebase.v1.GetActuatorInfoRequest"><span class="badge">M</span>GetActuatorInfoRequest</a>
</li>
- <li>
- <a href="#bytebase.v1.GetResourcePackageRequest"><span class="badge">M</span>GetResourcePackageRequest</a>
- </li>
-
<li>
<a href="#bytebase.v1.GetWorkspaceActuatorInfoRequest"><span class="badge">M</span>GetWorkspaceActuatorInfoRequest</a>
</li>
- <li>
- <a href="#bytebase.v1.ResourcePackage"><span class="badge">M</span>ResourcePackage</a>
- </li>
-
<li>
<a href="#bytebase.v1.Restriction"><span class="badge">M</span>Restriction</a>
</li>
@@ -2893,6 +2885,10 @@
<a href="#v1%2fworkspace_service.proto">v1/workspace_service.proto</a>
<ul>
+ <li>
+ <a href="#bytebase.v1.GetWorkspaceRequest"><span class="badge">M</span>GetWorkspaceRequest</a>
+ </li>
+
<li>
<a href="#bytebase.v1.ListWorkspacesRequest"><span class="badge">M</span>ListWorkspacesRequest</a>
</li>
@@ -7331,13 +7327,6 @@ Requires ENTERPRISE license. </p></td>
<td><p>The token for directory sync authentication. </p></td>
</tr>
- <tr>
- <td>branding_logo</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The branding logo as a data URI (e.g. data:image/png;base64,...). </p></td>
- </tr>
-
<tr>
<td>password_restriction</td>
<td><a href="#bytebase.v1.WorkspaceProfileSetting.PasswordRestriction">WorkspaceProfileSetting.PasswordRestriction</a></td>
@@ -7959,31 +7948,6 @@ Format: projects/{id} </p></td>
- <h3 id="bytebase.v1.GetResourcePackageRequest">GetResourcePackageRequest</h3>
- <p>Request message for getting branding resources.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Optional workspace name, format: workspaces/{workspace}.
-Set when using the workspace-scoped URL pattern. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
<h3 id="bytebase.v1.GetWorkspaceActuatorInfoRequest">GetWorkspaceActuatorInfoRequest</h3>
<p>Request message for getting workspace-scoped actuator information.</p>
@@ -8008,30 +7972,6 @@ Set when using the workspace-scoped URL pattern. </p></td>
- <h3 id="bytebase.v1.ResourcePackage">ResourcePackage</h3>
- <p>Custom branding resources for the Bytebase instance.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>logo</td>
- <td><a href="#bytes">bytes</a></td>
- <td></td>
- <td><p>The branding logo. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
<h3 id="bytebase.v1.Restriction">Restriction</h3>
<p></p>
@@ -8115,14 +8055,6 @@ Permissions required: bb.projects.create</p></td>
Permissions required: None</p></td>
</tr>
- <tr>
- <td>GetResourcePackage</td>
- <td><a href="#bytebase.v1.GetResourcePackageRequest">GetResourcePackageRequest</a></td>
- <td><a href="#bytebase.v1.ResourcePackage">ResourcePackage</a></td>
- <td><p>Gets custom branding resources such as logos.
-Permissions required: None</p></td>
- </tr>
-
<tr>
<td>GetWorkspaceActuatorInfo</td>
<td><a href="#bytebase.v1.GetWorkspaceActuatorInfoRequest">GetWorkspaceActuatorInfoRequest</a></td>
@@ -8180,23 +8112,6 @@ Permissions required: None</p></td>
- <tr>
- <td>GetResourcePackage</td>
- <td>GET</td>
- <td>/v1/actuator/resources</td>
- <td></td>
- </tr>
-
- <tr>
- <td>GetResourcePackage</td>
- <td>GET</td>
- <td>/v1/{name=workspaces/*}/actuator/resources</td>
- <td></td>
- </tr>
-
-
-
-
<tr>
<td>GetWorkspaceActuatorInfo</td>
<td>GET</td>
@@ -32482,6 +32397,31 @@ Permissions required: bb.worksheets.manage (or creator, or project member for PR
<p></p>
+ <h3 id="bytebase.v1.GetWorkspaceRequest">GetWorkspaceRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The workspace name, format: workspaces/{workspace}.
+Use &#34;workspaces/-&#34; to get the current/default workspace. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
<h3 id="bytebase.v1.ListWorkspacesRequest">ListWorkspacesRequest</h3>
<p></p>
@@ -32568,6 +32508,13 @@ Permissions required: bb.worksheets.manage (or creator, or project member for PR
<td><p> </p></td>
</tr>
+ <tr>
+ <td>logo</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The branding logo. </p></td>
+ </tr>
+
</tbody>
</table>
@@ -32589,6 +32536,17 @@ Permissions required: bb.worksheets.manage (or creator, or project member for PR
</thead>
<tbody>
+ <tr>
+ <td>GetWorkspace</td>
+ <td><a href="#bytebase.v1.GetWorkspaceRequest">GetWorkspaceRequest</a></td>
+ <td><a href="#bytebase.v1.Workspace">Workspace</a></td>
+ <td><p>Gets a workspace by name.
+Supports &#34;workspaces/-&#34; to resolve the current workspace:
+- Authenticated: uses the workspace from JWT context
+- Self-hosted unauthenticated: returns the single workspace
+- SaaS unauthenticated: returns minimal response</p></td>
+ </tr>
+
<tr>
<td>ListWorkspaces</td>
<td><a href="#bytebase.v1.ListWorkspacesRequest">ListWorkspacesRequest</a></td>
@@ -32639,6 +32597,16 @@ Permissions required: bb.workspaces.setIamPolicy</p></td>
+ <tr>
+ <td>GetWorkspace</td>
+ <td>GET</td>
+ <td>/v1/{name=workspaces/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
<tr>
<td>ListWorkspaces</td>
<td>GET</td>
diff --git a/proto/store/store/setting.proto b/proto/store/store/setting.proto
index 92d30568e9..dcc93306c8 100644
--- a/proto/store/store/setting.proto
+++ b/proto/store/store/setting.proto
@@ -109,8 +109,7 @@ message WorkspaceProfileSetting {
// The token for directory sync authentication.
string directory_sync_token = 15;
- // The branding logo as a data URI (e.g. data:image/png;base64,...).
- string branding_logo = 16;
+ reserved 16;
message PasswordRestriction {
// min_length is the minimum length for password, should be no less than 8.
diff --git a/proto/store/store/workspace.proto b/proto/store/store/workspace.proto
new file mode 100644
index 0000000000..75e6732eee
--- /dev/null
+++ b/proto/store/store/workspace.proto
@@ -0,0 +1,11 @@
+syntax = "proto3";
+
+package bytebase.store;
+
+option go_package = "generated-go/store";
+
+// WorkspacePayload stores workspace-level metadata.
+message WorkspacePayload {
+ string title = 1;
+ string logo = 2;
+}
diff --git a/proto/v1/v1/actuator_service.proto b/proto/v1/v1/actuator_service.proto
index 5a96fc7d3a..f29c4a1f07 100644
--- a/proto/v1/v1/actuator_service.proto
+++ b/proto/v1/v1/actuator_service.proto
@@ -41,17 +41,6 @@ service ActuatorService {
option (bytebase.v1.allow_without_credential) = true;
}
- // Gets custom branding resources such as logos.
- // Permissions required: None
- rpc GetResourcePackage(GetResourcePackageRequest) returns (ResourcePackage) {
- option (google.api.http) = {
- get: "/v1/actuator/resources"
- additional_bindings: {get: "/v1/{name=workspaces/*}/actuator/resources"}
- };
- option (google.api.method_signature) = "";
- option (bytebase.v1.allow_without_credential) = true;
- }
-
// Gets workspace-scoped actuator info. Requires authentication.
rpc GetWorkspaceActuatorInfo(GetWorkspaceActuatorInfoRequest) returns (ActuatorInfo) {
option (google.api.http) = {get: "/v1/{name=workspaces/*}/actuator/info"};
@@ -61,19 +50,6 @@ service ActuatorService {
}
}
-// Request message for getting branding resources.
-message GetResourcePackageRequest {
- // Optional workspace name, format: workspaces/{workspace}.
- // Set when using the workspace-scoped URL pattern.
- string name = 1;
-}
-
-// Custom branding resources for the Bytebase instance.
-message ResourcePackage {
- // The branding logo.
- bytes logo = 1;
-}
-
// Request message for setting up sample data.
message SetupSampleRequest {}
diff --git a/proto/v1/v1/setting_service.proto b/proto/v1/v1/setting_service.proto
index fc869e4572..b7200a327e 100644
--- a/proto/v1/v1/setting_service.proto
+++ b/proto/v1/v1/setting_service.proto
@@ -217,8 +217,7 @@ message WorkspaceProfileSetting {
// The token for directory sync authentication.
string directory_sync_token = 15;
- // The branding logo as a data URI (e.g. data:image/png;base64,...).
- string branding_logo = 16;
+ reserved 16;
message PasswordRestriction {
// min_length is the minimum length for password, should no less than 8.
diff --git a/proto/v1/v1/workspace_service.proto b/proto/v1/v1/workspace_service.proto
index e1bb02eb25..801ca61d9d 100644
--- a/proto/v1/v1/workspace_service.proto
+++ b/proto/v1/v1/workspace_service.proto
@@ -12,6 +12,16 @@ option go_package = "github.com/bytebase/bytebase/backend/generated-go/v1";
// WorkspaceService manages workspace-level operations and profile.
service WorkspaceService {
+ // Gets a workspace by name.
+ // Supports "workspaces/-" to resolve the current workspace:
+ // - Authenticated: uses the workspace from JWT context
+ // - Self-hosted unauthenticated: returns the single workspace
+ // - SaaS unauthenticated: returns minimal response
+ rpc GetWorkspace(GetWorkspaceRequest) returns (Workspace) {
+ option (google.api.http) = {get: "/v1/{name=workspaces/*}"};
+ option (bytebase.v1.allow_without_credential) = true;
+ }
+
// Lists all workspaces the current user is a member of.
rpc ListWorkspaces(ListWorkspacesRequest) returns (ListWorkspacesResponse) {
option (google.api.http) = {get: "/v1/workspaces"};
@@ -56,11 +66,20 @@ message ListWorkspacesResponse {
repeated Workspace workspaces = 1;
}
+message GetWorkspaceRequest {
+ // The workspace name, format: workspaces/{workspace}.
+ // Use "workspaces/-" to get the current/default workspace.
+ string name = 1;
+}
+
message Workspace {
// Format: workspaces/{workspace}
string name = 1;
string title = 2;
+
+ // The branding logo.
+ string logo = 3;
}
message UpdateWorkspaceRequest {