mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
use new same scope learn more link for all three error messages (#38528)
Just a small change as per slack discussion https://fleetdm.slack.com/archives/C03C41L5YEL/p1768923148269239
This commit is contained in:
parent
1480ffa432
commit
6315d00d89
1 changed files with 3 additions and 6 deletions
|
|
@ -164,17 +164,14 @@ func (ds *Datastore) verifyAppleConfigProfileScopesDoNotConflict(ctx context.Con
|
|||
var errorMessage string
|
||||
// If you change this URL you may need to change the frontend code as well which adds a
|
||||
// nicely formatted link to the error message.
|
||||
const learnMoreUserChannel = "https://fleetdm.com/learn-more-about/configuration-profiles-user-channel"
|
||||
const learnMoreSameScope = "https://fleetdm.com/learn-more-about/macos-configuration-profiles-same-scope"
|
||||
if isEdit {
|
||||
if scopeImplicitlyChanged {
|
||||
errorMessage = fmt.Sprintf(`Couldn't edit configuration profile (%s) because it was previously delivered to some hosts on the device channel. Change "PayloadScope" to "System" to keep existing behavior. Alternatively, if you want this profile to be delivered on the user channel, please specify a new identifier for this profile and delete the old profile. Learn more: %s`, cp.Identifier, learnMoreUserChannel)
|
||||
errorMessage = fmt.Sprintf(`Couldn't edit configuration profile (%s) because it was previously delivered to some hosts on the device channel. Change "PayloadScope" to "System" to keep existing behavior. Alternatively, if you want this profile to be delivered on the user channel, please specify a new identifier for this profile and delete the old profile. Learn more: %s`, cp.Identifier, learnMoreSameScope)
|
||||
} else {
|
||||
errorMessage = fmt.Sprintf(`Couldn't edit configuration profile (%s) because the profile's "PayloadScope" has changed. To change the “PayloadScope” of an existing profile, add a new profile with a new identifier with the desired scope and delete the old profile. Learn more: %s`, cp.Identifier, learnMoreUserChannel)
|
||||
errorMessage = fmt.Sprintf(`Couldn't edit configuration profile (%s) because the profile's "PayloadScope" has changed. To change the “PayloadScope” of an existing profile, add a new profile with a new identifier with the desired scope and delete the old profile. Learn more: %s`, cp.Identifier, learnMoreSameScope)
|
||||
}
|
||||
} else {
|
||||
// If you change this URL you may need to change the frontend code as well which adds a
|
||||
// nicely formatted link to the error message.
|
||||
const learnMoreSameScope = "https://fleetdm.com/learn-more-about/macos-configuration-profiles-same-scope"
|
||||
errorMessage = fmt.Sprintf(`Couldn't add configuration profile. This profile has the same "PayloadIdentifier" but a different "PayloadScope" as another profile in a separate team. Learn more: %s`, learnMoreSameScope)
|
||||
}
|
||||
return &fleet.BadRequestError{Message: errorMessage}
|
||||
|
|
|
|||
Loading…
Reference in a new issue