[feature/guest-links] introduce migration framework and import spacemember shares#617
Draft
rhafer wants to merge 9 commits intoopencloud-eu:feature/guest-linksfrom
Draft
[feature/guest-links] introduce migration framework and import spacemember shares#617rhafer wants to merge 9 commits intoopencloud-eu:feature/guest-linksfrom
rhafer wants to merge 9 commits intoopencloud-eu:feature/guest-linksfrom
Conversation
Move away from lazily initializing the connection to the metastorage and try initialize at service startup. This is ground work for the upcoming migration to import the space memberships into the jsoncs3 share manager.
This is not a service user (i.e. managed by the service-auth authentication), but a special just for the system metadata storage.
When the received share to import has a userid set, we need to update the UserReceiveState even if the Grantee is a group (to correctly import the "accepted" state).
For the upcoming migration of space memberships to the shareprovider the service user needs to be able to read the Grants of all spaceroots.
…pacemember shares The migration state (currently only the version number) is persisted on the metadata storage (migratiion/state.json). Add a first migration "0001_import_spacemembers" to import the spaceroot Grants on the storageprovider as shares into the manager. Issue: opencloud-eu/opencloud#2612
89bc138 to
ac8443e
Compare
Set a proper "unavailable" status that the caller can handle when the LDAP lookup failed because the LDAP server is unavailable instead of always returning "not found".
When importing space membership, the userid's from the grants do not have an IDP value set. Do a user/group lookup to get the correct IDP value. Cache results to avoid repeated lookups.
67975cf to
20ddefe
Compare
res might be nil when disk.Download returned an error
This file contains hidden or 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
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.
The migration state (currently only the version number) is persisted on the metadata storage (migratiion/state.json).
Add a first migration "0001_import_spacemembers" to import the spaceroot Grants on the storageprovider as shares into the manager.
There are still some open issues to address:
Issue: opencloud-eu/opencloud#2612