Nested Folders: Support listing nested folder children (#58566)

* Nested Folders: Support listing nested folder children

* Filter out subfolders with no permissions

* Apply suggestion from code review
This commit is contained in:
Sofia Papagiannaki
2022-12-19 10:52:04 +02:00
committed by GitHub
parent 0743c4eb87
commit b1ef5ab320
15 changed files with 181 additions and 88 deletions
+4 -9
View File
@@ -8,8 +8,8 @@ import (
)
type Service interface {
GetFolders(ctx context.Context, user *user.SignedInUser, orgID int64, limit int64, page int64) ([]*models.Folder, error)
// GetChildren returns an array containing all child folders.
GetChildren(ctx context.Context, cmd *GetChildrenQuery) ([]*Folder, error)
Create(ctx context.Context, cmd *CreateFolderCommand) (*Folder, error)
// GetFolder takes a GetFolderCommand and returns a folder matching the
@@ -45,11 +45,6 @@ type NestedFolderService interface {
// node.
GetParents(ctx context.Context, cmd *GetParentsQuery) ([]*Folder, error)
// GetTree returns an map containing all child folders starting from the
// given parent folder UID and descending to the requested depth. Use the
// sentinel value -1 to return all child folders.
//
// The map keys are folder uids and the values are the list of child folders
// for that parent.
GetTree(ctx context.Context, cmd *GetTreeQuery) ([]*Folder, error)
// GetChildren returns an array containing all child folders.
GetChildren(ctx context.Context, cmd *GetChildrenQuery) ([]*Folder, error)
}