/user/add

Exports the addUser method for the /api/user/add route.

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.

Parameters:
NameTypeDescription
reqObject

HTTP request.

resObject

HTTP response.

req.paramsObject

Request parameter.

Properties
NameTypeDescription
emailstring

Email to add.

userObject

Requesting user.

Properties
NameTypeDescription
adminboolean

Requesting user is admin.

(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.

Parameters:
NameTypeDescription
reqObject

HTTP request.

resObject

HTTP response.

req.paramsObject

Request parameter.

Properties
NameTypeDescription
emailstring

Email to add.

userObject

Requesting user.

Properties
NameTypeDescription
adminboolean

Requesting user is admin.

/user/delete

Exports the deleteUser method for the /api/user/delete route.

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.

Parameters:
NameTypeDescription
reqObject

HTTP request.

resObject

HTTP response.

req.paramsObject

Request parameter.

Properties
NameTypeDescription
emailstring

Email to add.

userObject

Requesting user.

Properties
NameTypeDescription
adminboolean

Requesting user is admin.

(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.

Parameters:
NameTypeDescription
reqObject

HTTP request.

resObject

HTTP response.

req.paramsObject

Request parameter.

Properties
NameTypeDescription
emailstring

Email to add.

userObject

Requesting user.

Properties
NameTypeDescription
adminboolean

Requesting user is admin.