Content
View differences
Updated by Hagen Schink over 12 years ago
**As** API developer
**I want** to be able to retrieve the ID of the authenticated user,
**so that** I am able to recognize work packages where I am author or assignee,
**so that** I am able to tell whether I am allowed to perform status changes that are only allowed for the author or assignee of a ticket.
**Acceptance criteria**
- api/v2/authentication.xml (and .json) returns the id of the authenticated user
**Implementation proposal**
Extend the response of authentication.xml as follows:
<authorization>
<authorized type="boolean">true</authorized>
<authenticated_user_id>($id_of_user)</authenticated_user_id> <authorized_user_id>($id_of_user)</authorized_user_id>
</authorization>
Where <code>authenticated\_user\_id</code> authorized\_user\_id is only present if authorized is true.
**I want** to be able to retrieve the ID of the authenticated user,
**so that** I am able to recognize work packages where I am author or assignee,
**so that** I am able to tell whether I am allowed to perform status changes that are only allowed for the author or assignee of a ticket.
**Acceptance criteria**
- api/v2/authentication.xml (and .json) returns the id of the authenticated user
**Implementation proposal**
Extend the response of authentication.xml as follows:
<authorization>
<authorized type="boolean">true</authorized>
<authenticated_user_id>($id_of_user)</authenticated_user_id>
</authorization>
Where <code>authenticated\_user\_id</code>