A REST API endpoint to retrieve one user needs to be build. This way the mobile Repair Tool application can fetch data of a user. This endpoint should return different data sets based on permissions. If the authorised user is for example not the same as the requested user, other permissions should be checked first before returning the whole date. If authorised user does not have the rights to view someone else profile, he should only receive the public data set. This is necessary to show information about a user within the application. For example the profile of the current building manager.
This ticket is about version 1 of the API.
Acceptance criteria
An endpoint is available to retrieve one space by its ID.
The response contains the data of the space according to the resource data contract.
Technical outworking
Tasks
[x] Work out a good solution to present different data sets of a resource. What are the best practices?
[x] Create new controller action UserController@show in App\API\V1\Http\Controllers.
Description
A REST API endpoint to retrieve one user needs to be build. This way the mobile Repair Tool application can fetch data of a user. This endpoint should return different data sets based on permissions. If the authorised user is for example not the same as the requested user, other permissions should be checked first before returning the whole date. If authorised user does not have the rights to view someone else profile, he should only receive the public data set. This is necessary to show information about a user within the application. For example the profile of the current building manager.
This ticket is about version 1 of the API.
Acceptance criteria
Technical outworking
Tasks
UserController@show
inApp\API\V1\Http\Controllers
.show
endpoint