It's all about the answers!

Ask a question

Check save permission of a user


Melanie Finke (7731520) | asked Aug 28 '13, 5:17 a.m.
edited Aug 28 '13, 5:20 a.m.
Hello,

I try to find out if a specific action is permitted for a specific User.

For example to save a work Item.
The return state IDetailedStatus object contains an ERROR enum and in addtion the message "Berechtigung verweigert" (permission denied). This seems to be localized and it is not the project areas local, because this is english in my case.

Is there a language independent way to find out, if the save operation is allowed for a specific user?

Best Regards,

Melanie
 

One answer



permanent link
Lauren Hayward Schaefer (3.3k11727) | answered Aug 28 '13, 7:00 a.m.
JAZZ DEVELOPER
Hi Melanie,
This related forum post can get you started: https://jazz.net/forum/questions/99322/how-to-get-the-permissions-set-on-a-user-programmaticallyserverside

Comments
Melanie Finke commented Aug 28 '13, 11:19 a.m.

Hi Lauren,

thank you for the fast answer.
Your link leads me to an explanation how to get the roles of a user.

This could be a first step because as far as I understood the permission is linked to the role.
Is there a way to figure out what permissions are assigned to a specific role?

I don't get the part from the linked posts and articel's. Could you provide a code sample?

Best regards


Lauren Hayward Schaefer commented Aug 29 '13, 6:50 a.m.
JAZZ DEVELOPER

Hi Melanie,
I did a little searching, and I don't think it's possible to get the operations available per role.  See https://jazz.net/forum/questions/119880/is-there-api-a-service-to-get-process-operation-permissions-per-role for more information.


1
Ralph Schoon commented Aug 29 '13, 7:23 a.m. | edited Aug 29 '13, 7:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Hi Lauren,

since the Eclipse client can get at the information on each level, I think it should be possible to gather this information, at least to some extend. This might require undocumented internal API's and it would also require some complex algorithms because it is necessary to follow https://jazz.net/library/article/292 and https://jazz.net/library/article/291. However, I think it would be possible to get at the data needed.

It would likely be a huge effort though.

Your answer


Register or to post 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.