Folders: Add validation that folder is not a parent of itself (#101569)

This commit is contained in:
Stephanie Hingtgen authored and GitHub committed 2025-03-04 13:56:21 -06:00
1 parent e933f7cf01
commit 7c35d741ba
5 files changed
+54 -6

No files matched your search

@@ -39,6 +39,10 @@ func (ss *FolderStoreImpl) Create(ctx context.Context, cmd folder.CreateFolderCo
return nil, folder.ErrBadRequest.Errorf("missing UID")
}
if cmd.UID == cmd.ParentUID {
return nil, folder.ErrFolderCannotBeParentOfItself
}
var foldr *folder.Folder
/*
version := 1