[Nested Folder] Block move operation that could introduce more than 8 level of depth,… (#59832)
* block move operation that could introduce more than 8 level of depth, forbid circular reference * move getHeight to store, mock store in service * fix linter
This commit is contained in:
@@ -27,4 +27,8 @@ type store interface {
|
||||
// GetChildren returns the set of immediate children folders (depth=1) of the
|
||||
// given folder.
|
||||
GetChildren(ctx context.Context, cmd folder.GetTreeQuery) ([]*folder.Folder, error)
|
||||
|
||||
// GetHeight returns the height of the folder tree. When parentUID is set, the function would
|
||||
// verify in the meanwhile that parentUID is not present in the subtree of the folder with the given UID.
|
||||
GetHeight(ctx context.Context, foldrUID string, orgID int64, parentUID *string) (int, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user