Access control: Modify dashboard/folder resolvers so that return also the inherited scopes (#62025)

* Access Control: Add folder service dependency to the dashboard/folder resolvers

* Expose the function fetching parents to folder interface

* Add generic prepend utility

* Modify dashboard resolvers to return inherited scopes
This commit is contained in:
Sofia Papagiannaki
2023-01-26 10:21:10 +02:00
committed by GitHub
parent 8e3d22ca7a
commit cd27562c76
15 changed files with 276 additions and 35 deletions
+3
View File
@@ -7,6 +7,9 @@ import (
type Service interface {
// GetChildren returns an array containing all child folders.
GetChildren(ctx context.Context, cmd *GetChildrenQuery) ([]*Folder, error)
// GetParents returns an array containing add parent folders if nested folders are enabled
// otherwise it returns an empty array
GetParents(ctx context.Context, q GetParentsQuery) ([]*Folder, error)
Create(ctx context.Context, cmd *CreateFolderCommand) (*Folder, error)
// GetFolder takes a GetFolderCommand and returns a folder matching the