cancel
Showing results for 
Search instead for 
Did you mean: 

How to get user permissions from PowerDesigner Java api

Former Member
0 Kudos

Hello,

I'm trying to use PowerDesigner Java api for user permission management. PdRMG.RepositoryDocumentBase class has

"DeletePermission(/* in */ BaseObject userOrGroup)"

"SetPermission(/* in */ BaseObject userOrGroup, /* in */ int permissionConstant)"

methods.

However I couldn't find a method for listing models permissions (users with permission). Is there any way to do this?

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member200945
Contributor

In this situation, you can write store procedure to directly execute SQL in your Java application.

For example , given user Peter, I assign him Write permission to a model called CityPlan.

Execute the following code:

select u.name, o.code, p.oprm from PMOBJT o, PMPERM p, PMUSER u where u.code='Peter' and o.code='CityPlan' and p.poid=o.poid and p.rusr=u.rusr

For more information, please study 'Repository Metamodel. pdm', which locates at your Powerdesigner folder, Examples subfolder.

GeorgeMcGeachie
Active Contributor
0 Kudos

Hello Phillip, your answer assumes a user has direct access to the database, which they may not. It also forces us to use a combination of methods to access metadata, which I prefer to avoid. Are there any plans to expose this metadata thorugh the API?

GeorgeMcGeachie
Active Contributor

I can't find a method either, and it doesn't look like you can get a preview from the DeletePermission method, which could be useful. There are methods to check if a user's permissions for anobject, but that's not what you want.

I suggest you raise an enhancement request with SAP.