-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[full-ci] add driveAlias to the graphAPI #3283
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
micbar
changed the title
add driveAlias to the graphAPI
[full-ci] add driveAlias to the graphAPI
Mar 15, 2022
micbar
force-pushed
the
drive-alias
branch
3 times, most recently
from
March 16, 2022 14:02
72691d2
to
0688064
Compare
micbar
requested review from
C0rby,
kobergj,
butonic,
dragotin and
dragonchaser
March 16, 2022 14:03
micbar
force-pushed
the
drive-alias
branch
8 times, most recently
from
March 16, 2022 15:36
6a46da7
to
be2e75d
Compare
kobergj
approved these changes
Mar 16, 2022
kulmann
approved these changes
Mar 16, 2022
Kudos, SonarCloud Quality Gate passed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implements owncloud/libre-graph-api#6
Needs cs3org/reva#2623
The concept is described in the ADR https://owncloud.dev/ocis/adr/0011-global-url-format/#mixed-global-urls in the section
mixed global urls
.Related Issue
Motivation and Context
Space identifier
The primary identifier for a space is always the UUID. A unique logical ID is the only stable indentifier that works under all circumstances
A technical URL with a stable identifier
https://cloud.owncloud.com/files/spaces/95b4c6f6-d8f2-4976-b0a3-1b016bdfcb7e/relative/path/to/file.txt
.Make it more user friendly
To make the URL human-readable we replace the UUID with an alias.
https://cloud.owncloud.com/files/spaces/personal/einstein/relative/path/to/file.txt
The WebUI discovers the spaces using the
/drives
Endpoint. It should return a space with the aliaspersonal/einstein
and theid:95b4c6f6-d8f2-4976-b0a3-1b016bdfcb7e
. This aliasing allows the WebUI to use human-readable URLs and translate the alias back into a UUID which is then used to make the actual WebDAV Requests.The problem with aliases is, that they are not unique, can be customized and might clash. Therefore the UUID is always appended as an URL Parameter
?id=95b4c6f6-d8f2-4976-b0a3-1b016bdfcb7e
Stable and user friendlyURL
https://cloud.owncloud.com/files/spaces/personal/einstein/relative/path/to/file.txt?id=95b4c6f6-d8f2-4976-b0a3-1b016bdfcb7e
New Config Options
STORAGE_USERS_DRIVER_S3NG_PERSONAL_SPACE_ALIAS_TEMPLATE
{{.SpaceType}}/{{.User.Username | lower}}
STORAGE_USERS_DRIVER_S3NG_GENERAL_SPACE_ALIAS_TEMPLATE
{{.SpaceType}}/{{.SpaceName | replace " " "-" | lower}}
STORAGE_USERS_DRIVER_OCIS_PERSONAL_SPACE_ALIAS_TEMPLATE
{{.SpaceType}}/{{.User.Username | lower}}
STORAGE_USERS_DRIVER_OCIS_GENERAL_SPACE_ALIAS_TEMPLATE
{{.SpaceType}}/{{.SpaceName | replace " " "-" | lower}}
How Has This Been Tested?
Example responses (if appropriate):
List personal space
Response
Create a space
Response
Modify a Space
Response
Types of changes
Checklist: