Users should be able to access their own information in the rest API

Issue #150 wontfix
DRayX
created an issue

A user should be able to retreive their own information from <SCM-Manager Base URL>/api/rest/users/<username>.<json|xml> even if they are not an administrator. They should of course not be able to see the all users one, but the ability to retrieve their own would be useful.

Comments (4)

  1. Sebastian Sebastian repo owner

    A user could get informations of his account by using the authentication endpoint:

    <SCM-Manager Base URL>/api/rest/authentication.<json|xml>

    But there is a bug with basic authentication on this endpoint. You have to use the form based authentication. Here is an example with curl:

    curl http://localhost:8080/scm/api/rest/authentication/login.xml --data 'username=scmadmin&password=scmadmin'

    This will return a xml or json scmstate object which contains the current user object.

    I will fix the basic authentication with the next version, but i will not change the rules for the user endpoint. The user endpoint is only for administrators.

  2. Log in to comment