Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

CRJAZ1319E Read access is not permitted.

 HI All, 
I am comparing baselines using java client api and fetching change sets,
Then I fetch work item of chagne set using below API

List<ILink> links = ChangeSetLinks.findLinks((ProviderFactory) teamRepository.getClientLibrary(ProviderFactory.class),sethandleforwi,
                    new String[] { ILinkConstants.CHANGESET_WORKITEM_LINKTYPE_ID },null);
for (final ILink lk : links)
{
 
final Object resolved = lk.getTargetRef().resolve();
if (resolved instanceof IWorkItemHandle)
{
workItem = (IWorkItem) iItemManager.fetchCompleteItem((IWorkItemHandle)resolved,IItemManager.DEFAULT,null);
                                                      //throws exception at this line
}
                                         }

Exception thrown at this line is 

com.ibm.team.repository.common.PermissionDeniedException: CRJAZ1319E Read access

is not permitted. The user, myadmin, tried to read one or more items that have the following type: WorkItem

What is cause of this error, and how can i resolve this error.

0 votes


Accepted answer

Permanent link
The most likely cause is you don't have permission to read the work item, so you can get the handle but not resolve the item. Since RTC 3.x there are read permissions and a permission aware API. You can use IItemManager().fetchCompleteItemsPermissionAware(handleList,IItemManager.REFRESH, monitor) to make sure you know if you have access to objects or not. See https://rsjazz.wordpress.com/2015/10/28/build-artifacts-publishing-and-automated-build-output-management-using-the-plain-java-client-libraries/ for how it is used.
David Lafreniere selected this answer as the correct answer

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,934
× 411
× 369
× 84

Question asked: Apr 26 '16, 1:27 a.m.

Question was seen: 3,629 times

Last updated: Apr 26 '16, 2:07 a.m.

Confirmation Cancel Confirm