Storage: use static access rules (#52334)

* Storage: use static access rules

* Storage: use static access rules

* Storage: add tests
This commit is contained in:
Artur Wierzbicki
2022-07-17 22:41:54 +04:00
committed by GitHub
parent e6a5b9ee7f
commit 6188526e1d
8 changed files with 319 additions and 52 deletions
+2 -1
View File
@@ -85,7 +85,7 @@ func (t *nestedTree) GetFile(ctx context.Context, orgId int64, path string) (*fi
return root.Store().Get(ctx, path)
}
func (t *nestedTree) ListFolder(ctx context.Context, orgId int64, path string) (*StorageListFrame, error) {
func (t *nestedTree) ListFolder(ctx context.Context, orgId int64, path string, accessFilter filestorage.PathFilter) (*StorageListFrame, error) {
if path == "" || path == "/" {
t.assureOrgIsInitialized(orgId)
@@ -150,6 +150,7 @@ func (t *nestedTree) ListFolder(ctx context.Context, orgId int64, path string) (
Recursive: false,
WithFolders: true,
WithFiles: true,
Filter: accessFilter,
})
if err != nil {