It's all about the answers!

Ask a question

Is there any java api to change the role or permission for a logged-in user?


Alexandra Li (112) | asked Feb 04 '16, 4:44 a.m.
Can I change the role or permission in CCM through Java API?

One answer



permanent link
Ralph Schoon (57.0k23642) | answered Feb 04 '16, 5:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
What do you want to achieve and why?

A Custom Condition to Make Attributes Required or Read-Only by Role Version 2 shows API to read the roles. You can also use the API to set the role as described in https://rsjazz.wordpress.com/2013/09/18/deploying-templates-and-creating-projects-using-the-plain-java-clients-library/, however, you must have the permission to do so! If you don't have the JazzAdmin repository role and no permission to save the process, you can't.

You can't break the system and elevate you to an admin.



Comments
Alexandra Li commented Feb 05 '16, 2:14 a.m.

Thanks for your answer.
My scenario is :
 I can not upload components through API into a stream because of my limited role. And  I am JazzGuests and JazzUser in repository, team member and scrum master in project area.
So what can I do to solve this probleam? what permissions or roles I have can solve this probleam?


Ralph Schoon commented Feb 05 '16, 2:29 a.m. | edited Feb 05 '16, 2:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The API does have the permissions and rights of the user using it. It (the server) will not allow a user to give himself more permissions (Except he is administrator in a project area, where he can assign himself permissions as he likes, or he has the JazzAdmin permission where he can pretty much give himself all the permissions available everywhere) . So: No.

This is not an issue that needs an API to solve it, this is an issue due to business conduct  guidelines or other reasons and you need to talk to the project administrators about your need and figure a way to solve this with them.


Alexandra Li commented Feb 13 '16, 8:34 p.m.

ok, thanks very much.

Your answer


Register or to post your answer.