Folders: Add validation that folder is not a parent of itself (#101569)
This commit is contained in:
committed by
GitHub
parent
e933f7cf01
commit
7c35d741ba
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user