chore: update demo site

This commit is contained in:
Johnny
2025-02-27 23:05:43 +08:00
parent 47b41bce85
commit 5562282822
3 changed files with 5 additions and 7 deletions

View File

@@ -70,12 +70,6 @@ func (s *APIV1Service) SetWorkspaceSetting(ctx context.Context, request *v1pb.Se
}
updateSetting := convertWorkspaceSettingToStore(request.Setting)
// Don't allow to update workspace general setting in demo mode.
// Such as disallow user registration, disallow password auth, etc.
if s.Profile.Mode == "demo" && updateSetting.Key == storepb.WorkspaceSettingKey_GENERAL {
return nil, status.Errorf(codes.InvalidArgument, "setting workspace setting is not allowed in demo mode")
}
workspaceSetting, err := s.Store.UpsertWorkspaceSetting(ctx, updateSetting)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to upsert workspace setting: %v", err)