owncloud / owncloud/ocis

Move file drop collision detection to storage provider

Open
#8,358 0 comments 0 reactions 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

As a follow up of https://github.com/owncloud/ocis/issues/8291 which was implemented with https://github.com/cs3org/reva/pull/4491 we should move the filename collision detection and renaming to the CS3 storage provider. Currently, only uploads via ocdav will rename files. Direct CS3 and dataprovider calls would still overwrite the file.

In order to solve this the logic should bove behind the CS3 api. Putting it into storage drivers would mein they have to reimplement it every time. So the correct place IMO is the storage provider.

However, I also think the storage provider should do far more than what it currently does. We should move a lot of business logic from decomposedfs to the storage provider. By extracting different storage aspects like Tree, Node, Lookup and others from decomposedfs we can make them reusable. Every storage first has to look up the Node for a given reference and then has to check if the user has the correct permissions. These two steps should be implemented like middlewares. Then the storage drivers will become less repetitive. Currently, every Storage interface implementation starts with some wrap/unwrap/lookup magic and then a permission check.

Furthermore, upstream CS3 extracted a space manager from the storageprovider api, which also affects what storage drivers need to implement.

So, a few things need to settle down before we can move the logic to a better place. Until then this issue needs to be kept open.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.