diff --git a/changelog/unreleased/check-permissions-in-ocis-driver.md b/changelog/unreleased/check-permissions-in-ocis-driver.md new file mode 100644 index 0000000000..b81c813839 --- /dev/null +++ b/changelog/unreleased/check-permissions-in-ocis-driver.md @@ -0,0 +1,5 @@ +Enhancement: check permissions in ocis driver + +We are now checking grant permissions in the ocis storage driver. + +https://github.com/cs3org/reva/pull/1213 diff --git a/pkg/storage/fs/ocis/node.go b/pkg/storage/fs/ocis/node.go index 1b763dd16b..fd9e2e8099 100644 --- a/pkg/storage/fs/ocis/node.go +++ b/pkg/storage/fs/ocis/node.go @@ -155,7 +155,7 @@ func ReadNode(ctx context.Context, lu *Lookup, id string) (n *Node, err error) { case isNoData(err): return nil, errtypes.InternalError(err.Error()) case isNotFound(err): - return nil, errtypes.NotFound(n.ID) + return n, nil // swallow not found, the node defaults to exists = false default: return nil, errtypes.InternalError(err.Error()) } @@ -182,7 +182,7 @@ func ReadNode(ctx context.Context, lu *Lookup, id string) (n *Node, err error) { log.Debug().Interface("node", n).Str("root.ID", root.ID).Str("parentID", parentID).Msg("ReadNode() found parent") } else { log.Error().Err(err).Interface("node", n).Str("root.ID", root.ID).Msg("ReadNode()") - if os.IsNotExist(err) { + if isNotFound(err) { return } return