fleet/server/service/validation_invites.go
Zach Wasserman b12a6cb4c1
Migrate old admin field to new global role (#609)
- Migrate old admins to global admins
- Migrate old non-admins to global maintainers
- Remove old admin column
- Give initial user global admin privilege
- Comment out some tests (to be refactored for new permissions model later)
2021-04-06 18:27:10 -07:00

19 lines
426 B
Go

package service
import (
"context"
"github.com/fleetdm/fleet/server/kolide"
)
func (mw validationMiddleware) InviteNewUser(ctx context.Context, payload kolide.InvitePayload) (*kolide.Invite, error) {
invalid := &invalidArgumentError{}
if payload.Email == nil {
invalid.Append("email", "missing required argument")
}
if invalid.HasErrors() {
return nil, invalid
}
return mw.Service.InviteNewUser(ctx, payload)
}