mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-06 00:14:07 +00:00
Update vendor
This commit is contained in:
39
vendor/github.com/mattermost/mattermost-server/v6/model/switch_request.go
generated
vendored
Normal file
39
vendor/github.com/mattermost/mattermost-server/v6/model/switch_request.go
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package model
|
||||
|
||||
type SwitchRequest struct {
|
||||
CurrentService string `json:"current_service"`
|
||||
NewService string `json:"new_service"`
|
||||
Email string `json:"email"`
|
||||
Password string `json:"password"`
|
||||
NewPassword string `json:"new_password"`
|
||||
MfaCode string `json:"mfa_code"`
|
||||
LdapLoginId string `json:"ldap_id"`
|
||||
}
|
||||
|
||||
func (o *SwitchRequest) EmailToOAuth() bool {
|
||||
return o.CurrentService == UserAuthServiceEmail &&
|
||||
(o.NewService == UserAuthServiceSaml ||
|
||||
o.NewService == UserAuthServiceGitlab ||
|
||||
o.NewService == ServiceGoogle ||
|
||||
o.NewService == ServiceOffice365 ||
|
||||
o.NewService == ServiceOpenid)
|
||||
}
|
||||
|
||||
func (o *SwitchRequest) OAuthToEmail() bool {
|
||||
return (o.CurrentService == UserAuthServiceSaml ||
|
||||
o.CurrentService == UserAuthServiceGitlab ||
|
||||
o.CurrentService == ServiceGoogle ||
|
||||
o.CurrentService == ServiceOffice365 ||
|
||||
o.CurrentService == ServiceOpenid) && o.NewService == UserAuthServiceEmail
|
||||
}
|
||||
|
||||
func (o *SwitchRequest) EmailToLdap() bool {
|
||||
return o.CurrentService == UserAuthServiceEmail && o.NewService == UserAuthServiceLdap
|
||||
}
|
||||
|
||||
func (o *SwitchRequest) LdapToEmail() bool {
|
||||
return o.CurrentService == UserAuthServiceLdap && o.NewService == UserAuthServiceEmail
|
||||
}
|
Reference in New Issue
Block a user