Getting PermissionDeniedException on programmatically getting WorkspaceManager of other user's workspace
Hi,
I'm accessing other users' workspace programmatically. When the workspace's permission is "private", sometimes another user gets PermissionDeniedException.
Following is the way I'm getting the IVersionable:
IVersionableHandle versionHandle = (IVersionableHandle) IFileItem.ITEM_TYPE.createItemHandle( UUID.valueOf(fileUuid), UUID.valueOf(stateUuid));
IVersionableManager verManager = SCMPlatform.getWorkspaceManager(repository).versionableManager();
return verManager.fetchCompleteState(versionHandle, monitor);
But the problem is that I'm not getting this exception systematically. For the same user/otherUser combinations, sometimes it works fine without any exceptions too !
I'm accessing other users' workspace programmatically. When the workspace's permission is "private", sometimes another user gets PermissionDeniedException.
Following is the way I'm getting the IVersionable:
IVersionableHandle versionHandle = (IVersionableHandle) IFileItem.ITEM_TYPE.createItemHandle( UUID.valueOf(fileUuid), UUID.valueOf(stateUuid));
IVersionableManager verManager = SCMPlatform.getWorkspaceManager(repository).versionableManager();
return verManager.fetchCompleteState(versionHandle, monitor);
But the problem is that I'm not getting this exception systematically. For the same user/otherUser combinations, sometimes it works fine without any exceptions too !
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Sep 01 '14, 11:20 a.m.Tim Mok
JAZZ DEVELOPER Sep 02 '14, 2:39 p.m.Atul Kumar
Sep 08 '14, 8:05 a.m.Tim Mok
JAZZ DEVELOPER Sep 08 '14, 8:38 a.m.Atul Kumar
Sep 09 '14, 1:36 a.m.