Skip to content

Commit

Permalink
PLT-7417/PLT-7425 (mattermost#7278)
Browse files Browse the repository at this point in the history
PLT-7417/PLT-7425 Update config.json defaults and removed admin console link settings
  • Loading branch information
hmhealey authored Aug 25, 2017
1 parent a360ac6 commit 086365f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 50 deletions.
8 changes: 3 additions & 5 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@
"AmazonS3Region": "us-east-1",
"AmazonS3Endpoint": "s3.amazonaws.com",
"AmazonS3SSL": true,
"AmazonS3SignV2": false
"AmazonS3SignV2": false,
"AmazonS3SSE": false
},
"EmailSettings": {
"EnableSignUpWithEmail": true,
Expand Down Expand Up @@ -165,9 +166,6 @@
"AboutLink": "https://about.mattermost.com/default-about/",
"HelpLink": "https://about.mattermost.com/default-help/",
"ReportAProblemLink": "https://about.mattermost.com/default-report-a-problem/",
"AdministratorsGuideLink": "https://about.mattermost.com/administrators-guide/",
"TroubleshootingForumLink": "https://about.mattermost.com/troubleshooting-forum/",
"CommercialSupportLink": "https://about.mattermost.com/commercial-support/",
"SupportEmail": "[email protected]"
},
"AnnouncementSettings": {
Expand Down Expand Up @@ -310,4 +308,4 @@
"PluginSettings": {
"Plugins": {}
}
}
}
42 changes: 6 additions & 36 deletions model/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,12 @@ type PrivacySettings struct {
}

type SupportSettings struct {
TermsOfServiceLink *string
PrivacyPolicyLink *string
AboutLink *string
HelpLink *string
ReportAProblemLink *string
AdministratorsGuideLink *string
TroubleshootingForumLink *string
CommercialSupportLink *string
SupportEmail *string
TermsOfServiceLink *string
PrivacyPolicyLink *string
AboutLink *string
HelpLink *string
ReportAProblemLink *string
SupportEmail *string
}

type AnnouncementSettings struct {
Expand Down Expand Up @@ -889,33 +886,6 @@ func (o *Config) SetDefaults() {
*o.SupportSettings.ReportAProblemLink = SUPPORT_SETTINGS_DEFAULT_REPORT_A_PROBLEM_LINK
}

if !IsSafeLink(o.SupportSettings.AdministratorsGuideLink) {
*o.SupportSettings.AdministratorsGuideLink = ""
}

if o.SupportSettings.AdministratorsGuideLink == nil {
o.SupportSettings.AdministratorsGuideLink = new(string)
*o.SupportSettings.AdministratorsGuideLink = SUPPORT_SETTINGS_DEFAULT_ADMINISTRATORS_GUIDE_LINK
}

if !IsSafeLink(o.SupportSettings.TroubleshootingForumLink) {
*o.SupportSettings.TroubleshootingForumLink = ""
}

if o.SupportSettings.TroubleshootingForumLink == nil {
o.SupportSettings.TroubleshootingForumLink = new(string)
*o.SupportSettings.TroubleshootingForumLink = SUPPORT_SETTINGS_DEFAULT_TROUBLESHOOTING_FORUM_LINK
}

if !IsSafeLink(o.SupportSettings.CommercialSupportLink) {
*o.SupportSettings.CommercialSupportLink = ""
}

if o.SupportSettings.CommercialSupportLink == nil {
o.SupportSettings.CommercialSupportLink = new(string)
*o.SupportSettings.CommercialSupportLink = SUPPORT_SETTINGS_DEFAULT_COMMERCIAL_SUPPORT_LINK
}

if o.SupportSettings.SupportEmail == nil {
o.SupportSettings.SupportEmail = new(string)
*o.SupportSettings.SupportEmail = SUPPORT_SETTINGS_DEFAULT_SUPPORT_EMAIL
Expand Down
3 changes: 0 additions & 3 deletions utils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,6 @@ func getClientConfig(c *model.Config) map[string]string {
props["AboutLink"] = *c.SupportSettings.AboutLink
props["HelpLink"] = *c.SupportSettings.HelpLink
props["ReportAProblemLink"] = *c.SupportSettings.ReportAProblemLink
props["AdministratorsGuideLink"] = *c.SupportSettings.AdministratorsGuideLink
props["TroubleshootingForumLink"] = *c.SupportSettings.TroubleshootingForumLink
props["CommercialSupportLink"] = *c.SupportSettings.CommercialSupportLink
props["SupportEmail"] = *c.SupportSettings.SupportEmail

props["EnableFileAttachments"] = strconv.FormatBool(*c.FileSettings.EnableFileAttachments)
Expand Down
11 changes: 5 additions & 6 deletions webapp/components/admin_console/admin_navbar_dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ export default class AdminNavbarDropdown extends React.Component {
}

render() {
const config = global.window.mm_config;
var teamsArray = []; // Array of team objects
var teams = []; // Array of team components
var teamsArray = []; // Array of team objects
var teams = []; // Array of team components
let switchTeams;

if (this.state.teamMembers && this.state.teamMembers.length > 0) {
Expand Down Expand Up @@ -154,7 +153,7 @@ export default class AdminNavbarDropdown extends React.Component {
/>
<li>
<Link
to={config.AdministratorsGuideLink}
to='https://about.mattermost.com/administrators-guide/'
rel='noopener noreferrer'
target='_blank'
>
Expand All @@ -166,7 +165,7 @@ export default class AdminNavbarDropdown extends React.Component {
</li>
<li>
<Link
to={config.TroubleshootingForumLink}
to='https://about.mattermost.com/troubleshooting-forum/'
rel='noopener noreferrer'
target='_blank'
>
Expand All @@ -178,7 +177,7 @@ export default class AdminNavbarDropdown extends React.Component {
</li>
<li>
<Link
to={config.CommercialSupportLink}
to='https://about.mattermost.com/commercial-support/'
rel='noopener noreferrer'
target='_blank'
>
Expand Down

0 comments on commit 086365f

Please sign in to comment.