Merge pull request #3904 from owncloud/Resharing

[full-ci] Resharing
This commit is contained in:
Jörn Friedrich Dreyer
2022-06-16 08:49:53 +00:00
committed by GitHub
10 changed files with 129 additions and 87 deletions
+5 -1
View File
@@ -497,11 +497,15 @@ func (g Graph) cs3StorageSpaceToDrive(ctx context.Context, baseURL *url.URL, spa
// will have the same id.
tmp := id
identity := libregraph.IdentitySet{User: &libregraph.Identity{Id: &tmp}}
// we need to map the permissions to the roles
switch {
case perm.AddGrant:
// having RemoveGrant qualifies you as a manager
case perm.RemoveGrant:
managerIdentities = append(managerIdentities, identity)
// InitiateFileUpload means you are an editor
case perm.InitiateFileUpload:
editorIdentities = append(editorIdentities, identity)
// Stat permission at least makes you a viewer
case perm.Stat:
viewerIdentities = append(viewerIdentities, identity)
}