RAM API to find Communities based on User Acccess Role
![]()
I need to use the RAM API to find out the communities for the logged in user in RAM where the user has Asset Consumer role.
In com.ibm.ram.client.RAMSession class there APIs to get the all the communities and also where the user has Asset Producer Roles and Administrator roles. Need help on how to find the communities with Asset Consumer role using RAMClient APIs. |
9 answers
![]()
Hi,
There isn't one. And to be precise there isn't one that returns the communities that the user has the AssetProducer role either. It isn't looking for that. It is looking for communities that the user can create assets within. Instead it is all roles that the user has that have the "Create" entitlement turned on, which can be more than just AssetProducer. Rich |
![]()
Not sure that I understand the question,
...API to find out the communities for the logged in user in RAM where the user has Asset Consumer role Asset Consumer is a dynamic role and can hold any level or entitlement permutation, regardless of the role's name. Users are not "members" of a community ... they have a "set" of permissions (roles) on various community. What are you asking for? Is it which communities one can create assets in. Which communities One can download assets from (are types important) Which communities I can see assets ... |
![]()
Thanks for the clarification Gili.
To start with, we would like to identify those communities where the user has "Download Assets" permission. Later on, we would like to identify communities based on some boolean combination of two or more permissions (e.g. "Download assets" AND "Subscribe to Assets"). Let me know if you need further clarification. Thanks. |
![]()
I need to find the communities where the User is able to search and download assets. |
![]()
As Rich noted earlier... there is no such API because the computation can be quite complex:
What you can see/download, really depends on Roles (Roles can be limited to categories/types), what state (collaborators, state's permission override) the asset is in, and Asset specific permission. We go at great length to "pre compute this" so that general search is quite efficient ... and independent on communities. ============== We have not seen a need for such API, as communities are typically a container ... what you can do, really depends on multiple things (as noted above). ============== Can you describe the use case scenario that makes it necessary to know in advance such things? |
![]() Can you describe the use case scenario that makes it necessary to know in advance such things? Use case is as follows: 1. Enterprise has one Asset Repository 2. Enterprise has several organizations 3. Each organization (say Org-A) is logically incharge of assets within a community (say Comm-A) assigned to it. 4. So users from this organization (Org-A) have permission to Create Assets, Delete Assets, and Download Assets in community Comm-A. 5. Users from organizations outside Org-A have only Download Assets permission to assets in Comm-A. 6. Our Tool, which leverages the RAM repository, wants to present a list of communities in its UI so a user may select one or more communities where she has Download Asset permission (and where such community contains assets). 7. Our Tool would then using RAM APIs to download assets from these user-selected communities. |
![]()
Hi,
Then you will only be asking on the behalf of a particular user and not on say "All users who have download in a community". There may be something which can help if you are looking for a single user instead of all users. This information is in the index, but unfortunately I don't see how do this search through the RAMClient and get the necessary info. It doesn't expose the necessary fields. And I think it prevents searching for the community asset field, which is needed to search just community like above. This info is more complete then just looking for roles for a user. It would be like the results shown on the Communities tab for a user, but with additional restriction of only if they have a download authority. This wouldn't narrow it down to there being assets in that community that they can download, only that they have authority in that community to do downloads for some assets. Sorry I couldn't be more helpful. Rich |
![]() ... It would be like the results shown on the Communities tab for a user, If we could do what you suggest above through the RAMClient API then I think it should work for us. Do you think it is doable with the current RAM APIs? If yes then we would like to understand the details better. |
![]()
Assuming that a consumer can download all the comes up on a search result
will the following work for figuring out which communities you can download from: Do a search * on behalf of that user and look at the community facets that comes back (using rest: https://<server>/ram/internal/search ... the atom feed you get back will have the
Regarding to which community one has upload support, you can do teh following from Java:
Or from Rest (https://jazz.net/wiki/bin/view/Main/RamRestApiMain), when you go throw the service discovery, when you get to the RAM services ( http://<server>/ram/oslc/servicesCatalog ) It will return you service providers per community that you have access to, including the top repository level server. |
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.