It's all about the answers!

Ask a question

API for determining if the current user is an administrator


Weiping Lu (452810) | asked Oct 02 '13, 6:31 p.m.
JAZZ DEVELOPER
Jazz Foundation Current User Service gives information of name, mail box, etc about the current user.

Is there a similar service that would also let me to determine if the current user is an jazz server administrator, i.e. if "JazzAdmins" check-box is checked?

Thanks

One answer



permanent link
Martha (Ruby) Andrews (3.0k44051) | answered Oct 03 '13, 5:28 p.m.
JAZZ DEVELOPER
Hello,
This work item may have added a feature you can use to get the information:

It tracks work to get all users in a particular group. From there, you could see if the user you are interested in is in the group:
Require a Reportable REST API that given a group name (e.g. JazzAdmins) returns its members (users). (232160)

Ruby
Martha (Ruby) Andrews


Comments
Weiping Lu commented Oct 03 '13, 7:52 p.m.
JAZZ DEVELOPER

Hi Martha,

Thank you very much - this is exactly the information I need.

Do you have any code snippet to show me how the API can be accessed by a java client?

For current user service I use the string constant "http://jazz.net/xmlns/foundation/1.0/CurrentUser" to obtain IServiceResource handle by using

IDiscoveryHelper helper = ...
IServiceResource currentUserServiceDescription = helper.getService(
                "http://jazz.net/xmlns/foundation/1.0/CurrentUser", null);

I am not sure what service constant should be used to get the IServiceResource handle for the IExternalUserRegistryInfoRestService service.

Thanks,

Weiping

Your answer


Register or to post your answer.