From f38f940d22fc5d8cead6d7dca0069d1a8da3bf09 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Thu, 18 Jan 2024 14:09:52 +0100 Subject: [PATCH] graph/sharing: Fix role conditions for Space specific sharing roles Co-Owner and Manager are space specific roles. They need the UnifiedRoleConditionOwner. --- services/graph/pkg/unifiedrole/unifiedrole.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/services/graph/pkg/unifiedrole/unifiedrole.go b/services/graph/pkg/unifiedrole/unifiedrole.go index 58890f8e81..fce338767c 100644 --- a/services/graph/pkg/unifiedrole/unifiedrole.go +++ b/services/graph/pkg/unifiedrole/unifiedrole.go @@ -153,7 +153,7 @@ func NewCoownerUnifiedRole() *libregraph.UnifiedRoleDefinition { RolePermissions: []libregraph.UnifiedRolePermission{ { AllowedResourceActions: convert(r), - Condition: proto.String(UnifiedRoleConditionGrantee), + Condition: proto.String(UnifiedRoleConditionOwner), }, }, LibreGraphWeight: proto.Int32(0), @@ -185,10 +185,6 @@ func NewManagerUnifiedRole() *libregraph.UnifiedRoleDefinition { Description: proto.String("Grants manager permissions on a resource. Semantically equivalent to co-owner"), DisplayName: displayName(r), RolePermissions: []libregraph.UnifiedRolePermission{ - { - AllowedResourceActions: convert(r), - Condition: proto.String(UnifiedRoleConditionGrantee), - }, { AllowedResourceActions: convert(r), Condition: proto.String(UnifiedRoleConditionOwner),