Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
chore: disallow update workspace setting in demo mode
Steven1e43c8d84b1d
diff --git a/server/route/api/v2/workspace_setting_service.go b/server/route/api/v2/workspace_setting_service.goindex 8b3941997..44a38d8da 100644--- a/server/route/api/v2/workspace_setting_service.go+++ b/server/route/api/v2/workspace_setting_service.go@@ -34,6 +34,10 @@ func (s *APIV2Service) GetWorkspaceSetting(ctx context.Context, request *apiv2pb}func (s *APIV2Service) SetWorkspaceSetting(ctx context.Context, request *apiv2pb.SetWorkspaceSettingRequest) (*apiv2pb.SetWorkspaceSettingResponse, error) {+ if s.Profile.Mode == "demo" {+ return nil, status.Errorf(codes.InvalidArgument, "setting workspace setting is not allowed in demo mode")+ }+user, err := getCurrentUser(ctx, s.Store)if err != nil {return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)