Renovus-Tech / solarec-java

GNU Affero General Public License v3.0
0 stars 1 forks source link

User's administration functionality #31

Open pferrariuy opened 5 months ago

pferrariuy commented 5 months ago

Feature Request

Description

Create a User's administration functionality endpoint so that an administrator can execute the basic CRUD action on the different users of the system.

Expected Behavior

Create an administration endpoint for users: /api/rest/admin/users and use the different HTTP methods to implement the corresponding CRUD actions.

GET /api/rest/admin/users/
POST /api/rest/admin/users
PUT /api/rest/admin/users
DELETE /api/rest/admin/users/#

Additional Context

For the GET method, the following parameters will be used to filter sort the information:

The GET method will support as an additional path the ID of an user, in order to return the full information of the user, while the endpoit without the user ID will return a list of partial user information, as JSON.

The POST and PUT methods will received a full information of the user as JSON.

Implementation Suggestions

The JSON of the user is currently implemented by the object tech.renovus.solarec.vo.rest.entity.User which will have to be updated to support all the CRUD operations.

The full information must include a list of all the related tables of the database that are directly linked to a user: profiles, clients, location, etc.

Impact on Existing Features

Current endpoints using the User object must not be affeceted by the coding of the functionality.

Related Issues