fleet/ee/server/service
Roberto Dip cd2ab6b17c
add server side validation for emails (#8022)
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"
    }
  ]
}
```
2022-10-03 13:29:01 -03:00
..
appconfig.go enable controlled rollout of features by teams (#7408) 2022-08-30 08:13:09 -03:00
devices.go Feature 7084: Add new EE endpoint for Fleet Desktop (#7530) 2022-09-12 15:37:38 -04:00
hosts.go only include policies in device endpoints for premium users (#6077) 2022-06-07 13:27:13 -03:00
service.go enable controlled rollout of features by teams (#7408) 2022-08-30 08:13:09 -03:00
software.go Include CVE scores when listing software (#5673) 2022-05-20 10:58:40 -06:00
teams.go Validate team and appconfig payloads, with dry-run and force modes (#7731) 2022-09-19 13:53:44 -04:00
users.go add server side validation for emails (#8022) 2022-10-03 13:29:01 -03:00