Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Added legal text to upgrade button, and showing again the Edition sec…
Browse files Browse the repository at this point in the history
…tion in team edition (#6470)

Automatic Merge
  • Loading branch information
jespino authored Sep 30, 2020
1 parent 58b1887 commit 4292e56
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 6 deletions.
9 changes: 4 additions & 5 deletions components/admin_console/admin_definition.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ const AdminDefinition = {
icon: 'fa-info-circle',
sectionTitle: t('admin.sidebar.about'),
sectionTitleDefault: 'About',
isHidden: it.not(it.userHasReadPermissionOnResource('about')),
isHidden: it.any(
it.configIsTrue('ExperimentalSettings', 'RestrictSystemAdmin'),
it.not(it.userHasReadPermissionOnResource('about')),
),
license: {
url: 'about/license',
title: t('admin.sidebar.license'),
Expand All @@ -199,10 +202,6 @@ const AdminDefinition = {
'Mattermost Enterprise Edition. Unlock enterprise features in this software through the purchase of a subscription from ',
'This software is offered under a commercial license.\n\nSee ENTERPRISE-EDITION-LICENSE.txt in your root install directory for details. See NOTICE.txt for information about open source software used in this system.',
],
isHidden: it.any(
it.not(it.enterpriseReady),
it.configIsTrue('ExperimentalSettings', 'RestrictSystemAdmin'),
),
isDisabled: it.not(it.userHasWritePermissionOnResource('about')),
schema: {
id: 'LicenseSettings',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,33 @@ exports[`components/AdminSidebar should match snapshot 1`] = `
<ul
className="nav nav-pills nav-stacked"
>
<AdminSidebarCategory
definitionKey="about"
icon="fa-info-circle"
key="about"
parentLink="/admin_console"
sectionClass=""
title={
<FormattedMessage
defaultMessage="About"
id="admin.sidebar.about"
/>
}
>
<AdminSidebarSection
definitionKey="about.license"
key="about.license"
name="about/license"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Edition and License"
id="admin.sidebar.license"
/>
}
/>
</AdminSidebarCategory>
<AdminSidebarCategory
definitionKey="reporting"
icon="fa-bar-chart"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ exports[`components/admin_console/license_settings/LicenseSettings load screen w
</LoadingWrapper>
</button>
</p>
<p
className="upgrade-legal-terms"
>
<injectIntl(FormattedMarkdownMessage)
defaultMessage="By clicking **Upgrade to Enterprise Edition**, I agree to the terms of the Mattermost Enterprise Edition License."
id="admin.license.enterprise.upgrade.accept-terms"
/>
</p>
</div>
</div>
</div>
Expand Down Expand Up @@ -979,6 +987,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
</LoadingWrapper>
</button>
</p>
<p
className="upgrade-legal-terms"
>
<injectIntl(FormattedMarkdownMessage)
defaultMessage="By clicking **Upgrade to Enterprise Edition**, I agree to the terms of the Mattermost Enterprise Edition License."
id="admin.license.enterprise.upgrade.accept-terms"
/>
</p>
</div>
</div>
</div>
Expand Down Expand Up @@ -1110,6 +1126,14 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
</LoadingWrapper>
</button>
</p>
<p
className="upgrade-legal-terms"
>
<injectIntl(FormattedMarkdownMessage)
defaultMessage="By clicking **Upgrade to Enterprise Edition**, I agree to the terms of the Mattermost Enterprise Edition License."
id="admin.license.enterprise.upgrade.accept-terms"
/>
</p>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ export default class LicenseSettings extends React.PureComponent {
</LoadingWrapper>
</button>
</p>
<p className='upgrade-legal-terms'>
<FormattedMarkdownMessage
id='admin.license.enterprise.upgrade.accept-terms'
defaultMessage='By clicking **Upgrade to Enterprise Edition**, I agree to the terms of the Mattermost Enterprise Edition License.'
/>
</p>
{this.state.upgradeError &&
<div className='col-sm-12'>
<div className='form-group has-error'>
Expand Down
1 change: 1 addition & 0 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,7 @@
"admin.license.enterprise.restart": "Restart Server",
"admin.license.enterprise.restarting": "Restarting",
"admin.license.enterprise.upgrade": "Upgrade to Enterprise Edition",
"admin.license.enterprise.upgrade.accept-terms": "By clicking **Upgrade to Enterprise Edition**, I agree to the terms of the Mattermost Enterprise Edition License.",
"admin.license.enterprise.upgrading": "Upgrading {percentage}%",
"admin.license.key": "License Key: ",
"admin.license.keyRemove": "Remove Enterprise License and Downgrade Server",
Expand Down
2 changes: 1 addition & 1 deletion sass/routes/_admin-console.scss
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@
font-weight: 400;
margin-top: 10px;
}
.trial-legal-terms {
.trial-legal-terms, .upgrade-legal-terms {
margin-top: 10px;
margin-bottom: 0;
color: $dark-gray;
Expand Down

0 comments on commit 4292e56

Please sign in to comment.