mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
cd2ab6b17c
related to https://github.com/fleetdm/fleet/issues/7199, this adds email validation to the `verifyCreateShared` which is used for user creation in the server. validation messages come directly from Go's `net/mail` package. ``` ~/fleet $ curl 'https://localhost:8080/api/latest/fleet/users/admin' -X POST -H 'Authorization: Bearer $TOKEN' --data-raw '{"email":"asdf","name":"asdf@asd.com","password":"as;lkdfjasdlk;fja3234@","global_role":"observer","teams":[]}' { "message": "Validation Failed", "errors": [ { "name": "email", "reason": "mail: missing '@' or angle-addr" } ] } ``` |
||
---|---|---|
.. | ||
appconfig.go | ||
devices.go | ||
hosts.go | ||
service.go | ||
software.go | ||
teams.go | ||
users.go |