[MM-64425] Add configurable account deletion link (#31396)
* [MM-64425] Add configurable account deletion link * Fix types * PR feedback --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6d7a8c6d72
Коммит
74258c3b7a
@@ -52,6 +52,7 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
|
||||
props["EnableInlineLatex"] = strconv.FormatBool(*c.ServiceSettings.EnableInlineLatex)
|
||||
props["ExtendSessionLengthWithActivity"] = strconv.FormatBool(*c.ServiceSettings.ExtendSessionLengthWithActivity)
|
||||
props["ManagedResourcePaths"] = *c.ServiceSettings.ManagedResourcePaths
|
||||
props["DeleteAccountLink"] = *c.ServiceSettings.DeleteAccountLink
|
||||
|
||||
// This setting is only temporary, so keep using the old setting name for the mobile and web apps
|
||||
props["ExperimentalEnablePostMetadata"] = "true"
|
||||
|
||||
@@ -454,6 +454,7 @@ type ServiceSettings struct {
|
||||
ScheduledPosts *bool `access:"site_posts"`
|
||||
EnableWebHubChannelIteration *bool `access:"write_restrictable,cloud_restrictable"` // telemetry: none
|
||||
FrameAncestors *string `access:"write_restrictable,cloud_restrictable"` // telemetry: none
|
||||
DeleteAccountLink *string `access:"site_users_and_teams,write_restrictable,cloud_restrictable"`
|
||||
}
|
||||
|
||||
var MattermostGiphySdkKey string
|
||||
@@ -989,6 +990,14 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
|
||||
if s.FrameAncestors == nil {
|
||||
s.FrameAncestors = NewPointer("")
|
||||
}
|
||||
|
||||
if !isSafeLink(s.DeleteAccountLink) {
|
||||
*s.DeleteAccountLink = ""
|
||||
}
|
||||
|
||||
if s.DeleteAccountLink == nil {
|
||||
s.DeleteAccountLink = NewPointer("")
|
||||
}
|
||||
}
|
||||
|
||||
type CacheSettings struct {
|
||||
|
||||
Ссылка в новой задаче
Block a user