From 0733de1c542ea558ba8bd390eabf0d6fba00847c Mon Sep 17 00:00:00 2001 From: kirillston Date: Fri, 6 Jun 2025 15:58:54 +0200 Subject: [PATCH] Restrict template objects creation --- pkg/lib/bundle/types.gen.go | 25 +++++++++++++------------ pkg/lib/bundle/types.json | 1 + 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/pkg/lib/bundle/types.gen.go b/pkg/lib/bundle/types.gen.go index eb50f06d7..5724649a2 100644 --- a/pkg/lib/bundle/types.gen.go +++ b/pkg/lib/bundle/types.gen.go @@ -9,7 +9,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/pb/model" ) -const TypeChecksum = "880c466315e22d0b573f6542b4ca1dcc4e2cb3395de3bad901f87460ff914191" +const TypeChecksum = "4887c4b1b59f6fa595cc67185d19aec9212680c2316aa452ec39b66d5eea1b83" const ( TypePrefix = "_ot" ) @@ -435,17 +435,18 @@ var ( }, TypeKeyTemplate: { - Description: "", - IconColor: 8, - IconName: "copy", - Layout: model.ObjectType_basic, - Name: "Template", - PluralName: "Templates", - Readonly: true, - RelationLinks: []*model.RelationLink{MustGetRelationLink(RelationKeyTargetObjectType), MustGetRelationLink(RelationKeyTemplateIsBundled)}, - Revision: 4, - Types: []model.SmartBlockType{model.SmartBlockType_Template}, - Url: TypePrefix + "template", + Description: "", + IconColor: 8, + IconName: "copy", + Layout: model.ObjectType_basic, + Name: "Template", + PluralName: "Templates", + Readonly: true, + RelationLinks: []*model.RelationLink{MustGetRelationLink(RelationKeyTargetObjectType), MustGetRelationLink(RelationKeyTemplateIsBundled)}, + RestrictObjectCreation: true, + Revision: 4, + Types: []model.SmartBlockType{model.SmartBlockType_Template}, + Url: TypePrefix + "template", }, TypeKeyVideo: { diff --git a/pkg/lib/bundle/types.json b/pkg/lib/bundle/types.json index 33f6a7df6..ed573dafa 100644 --- a/pkg/lib/bundle/types.json +++ b/pkg/lib/bundle/types.json @@ -298,6 +298,7 @@ "targetObjectType", "templateIsBundled" ], + "restrictObjectCreation": true, "revision": 4 }, {