mirror of
https://github.com/anyproto/anytype-heart.git
synced 2025-06-08 05:47:07 +09:00
Merge pull request #2370 from anyproto/go-5462-allow-collection-type-change
GO-5462 Remove TypeChange restriction from collection
This commit is contained in:
commit
48769892a4
2 changed files with 4 additions and 1 deletions
|
@ -373,6 +373,9 @@ func (bs *basic) getLayoutForType(objectTypeKey domain.TypeKey) (model.ObjectTyp
|
|||
|
||||
func (bs *basic) SetLayoutInState(s *state.State, toLayout model.ObjectTypeLayout, ignoreRestriction bool) (err error) {
|
||||
fromLayout, _ := s.Layout()
|
||||
if fromLayout == toLayout {
|
||||
return nil
|
||||
}
|
||||
|
||||
if !ignoreRestriction {
|
||||
if err = bs.Restrictions().Object.Check(model.Restrictions_LayoutChange); errors.Is(err, restriction.ErrRestricted) {
|
||||
|
|
|
@ -41,7 +41,7 @@ var (
|
|||
model.ObjectType_note: {},
|
||||
model.ObjectType_bookmark: {},
|
||||
model.ObjectType_set: objRestrictEdit,
|
||||
model.ObjectType_collection: objRestrictEdit,
|
||||
model.ObjectType_collection: objRestrictEdit.Copy().Remove(model.Restrictions_TypeChange),
|
||||
model.ObjectType_relationOptionsList: {
|
||||
model.Restrictions_Template: {},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue