mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-11 11:47:51 -04:00
add comment for mapping roles
Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
@@ -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 {
|
||||
// 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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user