Adding user as project area administrator with API
Hi
I am using REST API to bulk add a user as project member or project area administrator as it says on this library https://jazz.net/library/article/633
It all works fine except when I try to add the user to a project area where the user I am using in to login is not the project area administrator even though I have JazzAdmins and JazzProjectAdmins priviledges doesn't allows me to add the user, however if I go to the web application directly with the same credentials it allows me to add the user.
Can you please advice ?
Regards
I am using REST API to bulk add a user as project member or project area administrator as it says on this library https://jazz.net/library/article/633
It all works fine except when I try to add the user to a project area where the user I am using in to login is not the project area administrator even though I have JazzAdmins and JazzProjectAdmins priviledges doesn't allows me to add the user, however if I go to the web application directly with the same credentials it allows me to add the user.
Can you please advice ?
Regards
One answer
As you said it works fine, I guess you have already figured out the mistakes in the sample script in the jazz.net article.
2. There is an extra space just before the closing angle bracket. So (^ >) should be (^>).
While the script should work for CCM, QM and RM, each application behaves a bit differently. The permission issue that you get could be the result of missing HTTP request header "X-Jazz-CSRF-Prevent". The ccm.log file may give a more accurate indication why the operation fails. It's similar to what's been discussed in the below post.
https://jazz.net/forum/questions/63757/programmatically-create-a-project-area-on-rtc-with-curl
(See Ruby's answer at the bottom of the post)
As far as I can see, RM does not require this HTTP request header for the same operation.
1. The namespace should start with "http", not "https".echo ^<jp06:members xmlns:jp06="https://jazz.net/xmlns/prod/jazz/process/0.6/"^ > >> %POST_BODY_FILE%
2. There is an extra space just before the closing angle bracket. So (^ >) should be (^>).
While the script should work for CCM, QM and RM, each application behaves a bit differently. The permission issue that you get could be the result of missing HTTP request header "X-Jazz-CSRF-Prevent". The ccm.log file may give a more accurate indication why the operation fails. It's similar to what's been discussed in the below post.
https://jazz.net/forum/questions/63757/programmatically-create-a-project-area-on-rtc-with-curl
(See Ruby's answer at the bottom of the post)
As far as I can see, RM does not require this HTTP request header for the same operation.
Comments
Hi
I actually didn't use the sample script since I am using linux bash scripting, I developed my own script to do it and it is working fine with the exception of those project areas where my user is not the project area administrator even though my user has JazzAdmins priviledges, so for those project areas I need to do it using the web gui
Regards
Just having JazzAdmins does not automatically grant you all permissions in a project area. You might have to add yourself to the PA administrators and as member to the PA and grant the member a role that has permissions to perform a specific operation. Some, but not all are automatically overwritten if you have JazzAdmin, so you actually can perform the steps above.