/user/add
Exports the addUser method for the /api/user/add route.
- Source
- Source
Requires
Methods
(inner) addUser(req, res)
The /api/user/add?email=dennis@geolytix.co.uk
endpoint requests to add the email param as a new record to the ACL.
The addUser method is routed by the User API module.
The method must be requested by a user with admin priviliges.
The request will return if the user already exists.
Otherwise a new user record for the email provided as parameter will be added to the ACL.
The new user added to the ACL via the [user] add method will automatically be verified and approved by the requesting admin user.
Name | Type | Description |
---|---|---|
req | Object | HTTP request. |
res | Object | HTTP response. |
Name | Type | Attributes | Description |
---|---|---|---|
req.params | Object | Request parameter. | |
params.email | string | Email to add. | |
params.roles | Array.<string> | <optional> | Optional array of role keys to assign. |
params.user | Object | Requesting user. | |
user.admin | boolean | Requesting user is admin. |
- Source
(inner) deleteUser(req, res)
/api/user/delete?email=dennis@geolytix.co.uk
The deleteUser method is routed by the User API module.
The method must be requested by a user with admin priviliges or by a user wanting to delete their own ACL record.
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
req | Object | HTTP request. | |||||||||||||||
res | Object | HTTP response. | |||||||||||||||
req.params | Object | Request parameter. Properties
|
- Source