grafana/pkg/api/dtos/invite.go
linoman ac84069071
Password policy (#82268)
* add password service interface

* add password service implementation

* add tests for password service

* add password service wiring

* add feature toggle

* Rework from service interface to static function

* Replace previous password validations

* Add codeowners to password service

* add error logs

* update config files


---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-02-16 04:58:05 -06:00

30 lines
883 B
Go

package dtos
import (
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/services/user"
)
type AddInviteForm struct {
LoginOrEmail string `json:"loginOrEmail" binding:"Required"`
Name string `json:"name"`
Role org.RoleType `json:"role" binding:"Required"`
SendEmail bool `json:"sendEmail"`
}
type InviteInfo struct {
Email string `json:"email"`
Name string `json:"name"`
Username string `json:"username"`
InvitedBy string `json:"invitedBy"`
}
type CompleteInviteForm struct {
InviteCode string `json:"inviteCode"`
Email string `json:"email" binding:"Required"`
Name string `json:"name"`
Username string `json:"username"`
Password user.Password `json:"password"`
ConfirmPassword user.Password `json:"confirmPassword"`
}