Is there any java api to change the role or permission for a logged-in user?
One answer
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
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?
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.
ok, thanks very much.