Skip to content

Commit

Permalink
graph/sharing: Fix role conditions for Space specific sharing roles
Browse files Browse the repository at this point in the history
Co-Owner and Manager are space specific roles. They need the UnifiedRoleConditionOwner.
  • Loading branch information
rhafer committed Jan 24, 2024
1 parent c8818f5 commit fa70d58
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions services/graph/pkg/unifiedrole/unifiedrole.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit fa70d58

Please sign in to comment.