Skip to content

Commit

Permalink
check permissions also for processing nodes
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <jkoberg@owncloud.com>
  • Loading branch information
kobergj committed Jun 29, 2022
1 parent 3ddae70 commit 57026f2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/storage/utils/decomposedfs/decomposedfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,17 +504,13 @@ func (fs *Decomposedfs) GetMD(ctx context.Context, ref *provider.Reference, mdKe
return
}

isprocessing := node.IsProcessing()
if !isprocessing && !node.Exists {
if !node.Exists {
err = errtypes.NotFound(filepath.Join(node.ParentID, node.Name))
return
}

rp, err := fs.p.AssemblePermissions(ctx, node)
switch {
case isprocessing:
// FIXME: how to check permissions for files while processing?
// the node is empty and holds no further information
case err != nil:
return nil, errtypes.InternalError(err.Error())
case !rp.Stat:
Expand Down

0 comments on commit 57026f2

Please sign in to comment.