Skip to content

Commit

Permalink
make codacy happy (part II)
Browse files Browse the repository at this point in the history
  • Loading branch information
kobergj committed Dec 6, 2021
1 parent 29a1ae8 commit cbe1a2c
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions pkg/storage/registry/spaces/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,29 @@ The pattern is used when matching the path for path based requests.

### Rules
A rule has several properties:
- `mapping` unused?
- `address` The ip address of the CS3 storage provider
- `path_template` TODO -> rename to space_path or space_mount_point
- `aliases` unused?
- `allowed_user_agents` unused? FIXME this seems to be used to route requests based on user agent
- `mapping` unused?
- `address` The ip address of the CS3 storage provider
- `path_template` TODO -> rename to space_path or space_mount_point
- `aliases` unused?
- `allowed_user_agents` unused? FIXME this seems to be used to route requests based on user agent

It also carries filters that are sent with a ListStorageSpaces call to a storage provider
- `space_type` only list spaces of this type
- `space_owner_self` only list spaces where the user is owner (eg. for the users home)
- `space_id` only list a specific space
- `space_type` only list spaces of this type
- `space_owner_self` only list spaces where the user is owner (eg. for the users home)
- `space_id` only list a specific space

## How to deal with name collisions

1. The registry manages path segments that are aliases for storage space ids
2. every user can have their own paths (because every user can have multiple incoming project / share spaces with the same display name, eg two incoming shares for 'Documents' or two different Project spaces with the same Name. To distinguish spaces with the same display name in the webdav api they need to be assigned a unique path = space id alias)
3. aliases are uniqe per user
4. a space has three identifiers:
- a unique space id, used to allow clients to always distinguish spaces
- a display name, that is assigned by the owner or managers, eg. project names or 'Phils Home' for personal spaces. They are not unique
- an alias that is human readable and unique per user. It is used when listing paths on the CS3 global names as well as oc10 `/webdav` and `/dav/files/{username}` endpoints
- a unique space id, used to allow clients to always distinguish spaces
- a display name, that is assigned by the owner or managers, eg. project names or 'Phils Home' for personal spaces. They are not unique
- an alias that is human readable and unique per user. It is used when listing paths on the CS3 global names as well as oc10 `/webdav` and `/dav/files/{username}` endpoints
5. on the ocis `/dav/spaces/{spaceid}/` endpoint the alias is actually not used because navigation happens by `{spaceid}`
6. Every user has their own list of path to spaceid mappings, like one config file per user.

## consequences for storage providers
1. when creating a spaces the storage provider does not know anything about aliases
2. when listing the root of a storage provider with a path based reference it will present a list of storageids, not aliases (that is what the registry is for)

1. when creating a spaces the storage provider does not know anything about aliases
2. when listing the root of a storage provider with a path based reference it will present a list of storageids, not aliases (that is what the registry is for)

0 comments on commit cbe1a2c

Please sign in to comment.