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

This commit is contained in:
Stephanie Hingtgen
2025-03-04 12:56:21 -07:00
committed by GitHub
parent e933f7cf01
commit 7c35d741ba
5 changed files with 54 additions and 6 deletions
@@ -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