Skip to content

Commit

Permalink
Grant expand role assignments (#51)
Browse files Browse the repository at this point in the history
* grant expand roles

* remove extra line
  • Loading branch information
laurenleach authored Nov 13, 2024
1 parent 92fc66f commit f815a6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/connector/custom_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (o *customRoleResourceType) Entitlements(
sdkEntitlement.WithAnnotation(&v2.V1Identifier{
Id: V1MembershipEntitlementID(role.Type),
}),
sdkEntitlement.WithGrantableTo(resourceTypeUser),
sdkEntitlement.WithGrantableTo(resourceTypeUser, resourceTypeGroup),
)
rv = append(rv, en)

Expand Down
4 changes: 4 additions & 0 deletions pkg/connector/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,10 @@ func roleGroupGrant(groupID string, resource *v2.Resource) *v2.Grant {
sdkGrant.WithAnnotation(&v2.V1Identifier{
Id: fmtGrantIdV1(V1MembershipEntitlementID(resource.Id.Resource), groupID),
}),
sdkGrant.WithAnnotation(&v2.GrantExpandable{
EntitlementIds: []string{fmt.Sprintf("group:%s:member", groupID)},
Shallow: true,
}),
)
}

Expand Down

0 comments on commit f815a6c

Please sign in to comment.