Is there a simple API that can determine if a contributor has access to a component?
Relative to defect 328755 I'm attempting to write a program (using the plain Java API) that can fix user's workspaces, removing components that they don't have access to.
I'm finding it difficult to navigate read scopes & owners for components and then tie that information back to who can actually view a component. I find it hard to believe that the code I'm in the middle of writing (i.e. navigating the IReadScope of an IComponentHandle) hasn't been done already in RTC. Ideally I'm looking for an API like this:
boolean canRead (IContributorHandle, IComponentHandle)
Does something like this already exist in a usable form somewhere? I've looked & can't find anything. I can't believe that there's no higher level abstraction available for something as important as access control...
Accepted answer
There is no API exposed for something like that. We probably grind out the information internally but even for that case we are just checking it against the user that's currently logged in to the repository (given that we have no UI that shows you some cross mapping of who-sees-what-components in RTC).