How to check whether a role may see a process

Hello.

Can anybody advise how to find out (from within a program running in MWS, e.g. a portlet) whether a certain role has the permission to see instances of a certain process model in WmMonitor?

This is configured via MWS GUI (“Administration -> User management -> Roles”, then click on a role and add some process models).

I tried to ask in another forum (see the thread http://tech.forums.softwareag.com/techjforum/posts/list/51486.page), but nobody could tell.

So how can I check the permission programmatically? I.e. how can I implement the following Java method:

boolean canSeeProcess(String roleName, String processModelId)

And on a related note: how can I set (grant) such permissions?

Thanks in advance for any advice!