mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 17:28:54 +00:00
b12a6cb4c1
- 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)
19 lines
426 B
Go
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)
|
|
}
|