Using Groovy and Apiv2, How can you assign a group to a specific role?
I have a need to add a group to a role and not just a single ueser id
I can add a single user using the below code, but how do I add a group comprising of multiple users. There must be a quick way to do this, rather having to loop through all members of the group and add them individually
assetApi.setAssetResponsibilities(SetAssetResponsibilitiesRequest.builder()
.assetId(newIssueUuid)
.roleId(string2Uuid("00000000-0000-0000-0000-000000005032")) //UUID for Reviewer
.ownerIds(string2Uuid("018e58b7-95bd-720a-b1f5-b41927345f1e"))
.build())
Best Regards
Bobby
Sean Pyle
·2 years ago · EditedHi Bobby,
Here's a way you can add all members of a group programmatically.