API, Environment variable for bespoke functionality for customer-preston (#28893)
## For #28221 - Add support for env var / flag - surface as `config.partnerships.enable_primo` if `true`, omit from response otherwise ### when `FLEET_PARTNERSHIPS_ENABLE_PRIMO=true`:  ### when `FLEET_PARTNERSHIPS_ENABLE_PRIMO=false` or not set:  ~Changes file added for user-visible changes in `changes/`~ in companion frontend PR - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
co-authored by
Jacob Shandling
parent
ca08e7380f
commit
2f67a87e53
@@ -622,6 +622,7 @@ type FleetConfig struct {
|
||||
|
||||
type PartnershipsConfig struct {
|
||||
EnableSecureframe bool `yaml:"enable_secureframe"`
|
||||
EnablePrimo bool `yaml:"enable_primo"`
|
||||
}
|
||||
|
||||
type MDMConfig struct {
|
||||
@@ -1169,6 +1170,7 @@ func (man Manager) addConfigs() {
|
||||
|
||||
// Email
|
||||
man.addConfigString("email.backend", "", "Provide the email backend type, acceptable values are currently \"ses\" and \"default\" or empty string which will default to SMTP")
|
||||
|
||||
// SES
|
||||
man.addConfigString("ses.region", "", "AWS Region to use")
|
||||
man.addConfigString("ses.endpoint_url", "", "AWS Service Endpoint to use (leave empty for default service endpoints)")
|
||||
@@ -1412,6 +1414,7 @@ func (man Manager) addConfigs() {
|
||||
|
||||
// Partnerships
|
||||
man.addConfigBool("partnerships.enable_secureframe", false, "Point transparency URL at Secureframe landing page")
|
||||
man.addConfigBool("partnerships.enable_primo", false, "Cosmetically disables team capabilities in the UI")
|
||||
}
|
||||
|
||||
func (man Manager) hideConfig(name string) {
|
||||
@@ -1692,6 +1695,7 @@ func (man Manager) LoadConfig() FleetConfig {
|
||||
},
|
||||
Partnerships: PartnershipsConfig{
|
||||
EnableSecureframe: man.getConfigBool("partnerships.enable_secureframe"),
|
||||
EnablePrimo: man.getConfigBool("partnerships.enable_primo"),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user