How to create access groups programmatically?
Accepted answer
Java Client API code:
IAccessGroupClientService clientService = (IAccessGroupClientService) repo.getClientLibrary(IAccessGroupClientService.class);
IWorkItemCommon workItemCommon = (IWorkItemCommon)repo.getClientLibrary(IWorkItemCommon.class);
accessGroup = (IAccessGroup) workItemCommon.getAuditableCommon().createAuditable(IAccessGroup.ITEM_TYPE);
accessGroup.setName(strAccessGroupName);
//Add at least one IProjectArea, ITeamArea or IContributor
accessGroup.add(projectArea, ReadAccessContextType.MEMBERS);
clientService.save(accessGroup, null);
One other answer
FYI, for more info. about access groups, see Using access groups to control access to artifacts.
Ken
Comments
sam detweiler
Jul 25 '16, 8:27 a.m.what is an 'access group'? I know team area and role..
sam detweiler
Jul 25 '16, 12:17 p.m.access groups are new since 6.0.1
see https://jazz.net/forum/questions/222070/what-is-the-term-access-group-in-rtc-and-how-is-it-related-to-streamscomponents
David Lafreniere
FORUM MODERATOR / JAZZ DEVELOPER Jul 25 '16, 12:52 p.m.Reply to: "access group are new since 6.0.1".