Add minor code review changes.

Этот коммит содержится в:
Conor Macpherson
2022-12-21 11:54:45 -05:00
родитель a64be851c0
Коммит 77d3e3591a
4 изменённых файлов: 12 добавлений и 13 удалений

Просмотреть файл

@@ -368,16 +368,17 @@ func requestTrueUpReview(c *Context, w http.ResponseWriter, r *http.Request) {
} }
// Authentication Features // Authentication Features
mfaUsed := c.App.Config().ServiceSettings.EnforceMultifactorAuthentication config := c.App.Config()
ldapUsed := c.App.Config().LdapSettings.Enable mfaUsed := config.ServiceSettings.EnforceMultifactorAuthentication
samlUsed := c.App.Config().SamlSettings.Enable ldapUsed := config.LdapSettings.Enable
openIdUsed := c.App.Config().OpenIdSettings.Enable samlUsed := config.SamlSettings.Enable
guessAccessAllowed := c.App.Config().GuestAccountsSettings.Enable openIdUsed := config.OpenIdSettings.Enable
guessAccessAllowed := config.GuestAccountsSettings.Enable
authFeatures := map[string]*bool{ authFeatures := map[string]*bool{
model.TrueUpReviewAuthFeaturesMfa: mfaUsed, model.TrueUpReviewAuthFeaturesMfa: mfaUsed,
model.TueUpReviewAuthFeaturesAdLdap: ldapUsed, model.TrueUpReviewAuthFeaturesADLdap: ldapUsed,
model.TrueUpReviewauthFeaturesSaml: samlUsed, model.TrueUpReviewAuthFeaturesSaml: samlUsed,
model.TrueUpReviewAuthFeatureOpenId: openIdUsed, model.TrueUpReviewAuthFeatureOpenId: openIdUsed,
model.TrueUpReviewAuthFeatureGuestAccess: guessAccessAllowed, model.TrueUpReviewAuthFeatureGuestAccess: guessAccessAllowed,
} }

Просмотреть файл

@@ -40,10 +40,10 @@ var (
) )
const ( const (
TrueUpReviewTelemetryName = "true-up-review-sent" TrueUpReviewTelemetryName = "true_up_review_sent"
TrueUpReviewAuthFeaturesMfa = "multi_factor_authentication" TrueUpReviewAuthFeaturesMfa = "multi_factor_authentication"
TueUpReviewAuthFeaturesAdLdap = "ad_ldap_sign_in" TrueUpReviewAuthFeaturesADLdap = "ad_ldap_sign_in"
TrueUpReviewauthFeaturesSaml = "saml_sign_in" TrueUpReviewAuthFeaturesSaml = "saml_sign_in"
TrueUpReviewAuthFeatureOpenId = "openid_connect" TrueUpReviewAuthFeatureOpenId = "openid_connect"
TrueUpReviewAuthFeatureGuestAccess = "guest_access" TrueUpReviewAuthFeatureGuestAccess = "guest_access"
) )

Просмотреть файл

@@ -7,7 +7,7 @@ type TrueUpReviewProfile struct {
ServerId string `json:"server_id"` ServerId string `json:"server_id"`
ServerVersion string `json:"server_version"` ServerVersion string `json:"server_version"`
ServerInstallationType string `json:"server_installation_type"` ServerInstallationType string `json:"server_installation_type"`
LicenseId string `json:"licnes_id"` LicenseId string `json:"license_id"`
LicensedSeats int `json:"licensed_seats"` LicensedSeats int `json:"licensed_seats"`
LicensePlan string `json:"license_plan"` LicensePlan string `json:"license_plan"`
CustomerName string `json:"customer_name"` CustomerName string `json:"customer_name"`

Просмотреть файл

@@ -82,8 +82,6 @@ const (
TrackLicense = "license" TrackLicense = "license"
TrackServer = "server" TrackServer = "server"
TrackPlugins = "plugins" TrackPlugins = "plugins"
TrackTrueUpReview = "true_up_review"
) )
type ServerIface interface { type ServerIface interface {