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

This commit is contained in:
Stephanie Hingtgen
2025-03-04 13:56:21 -06:00
committed by GitHub
parent e933f7cf01
commit 7c35d741ba
5 changed files with 54 additions and 6 deletions
+2
View File
@@ -1,6 +1,7 @@
package folder
import (
"errors"
"fmt"
"time"
@@ -20,6 +21,7 @@ var ErrInternal = errutil.Internal("folder.internal")
var ErrCircularReference = errutil.BadRequest("folder.circular-reference", errutil.WithPublicMessage("Circular reference detected"))
var ErrTargetRegistrySrvConflict = errutil.Internal("folder.target-registry-srv-conflict")
var ErrFolderNotEmpty = errutil.BadRequest("folder.not-empty", errutil.WithPublicMessage("Folder cannot be deleted: folder is not empty"))
var ErrFolderCannotBeParentOfItself = errors.New("folder cannot be parent of itself")
const (
GeneralFolderUID = "general"