summaryrefslogtreecommitdiffstats
path: root/webapp/components/admin_console/admin_sidebar.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-07-29 14:58:37 -0400
committerChristopher Speller <crspeller@gmail.com>2016-07-29 14:58:37 -0400
commit3f8dda6f5ad676c976fd5ae575a6790fdb505449 (patch)
tree015a739989103ce38481176fd5d55f5f703789cb /webapp/components/admin_console/admin_sidebar.jsx
parent748fdef1fbded624a786533e8f065b91a047b91c (diff)
downloadchat-3f8dda6f5ad676c976fd5ae575a6790fdb505449.tar.gz
chat-3f8dda6f5ad676c976fd5ae575a6790fdb505449.tar.bz2
chat-3f8dda6f5ad676c976fd5ae575a6790fdb505449.zip
PLT-3633 EE: Add Google and Office365 SSO through OAuth2 (#3660)
* EE: Add Google and Office365 SSO through OAuth2 * Add localization strings * Text tweaks for PLT-3633 * Added sign-up button for Office 365 * Updated some error messages and a bit of licensing * Updated sign-in method section in user settings to include Google and Office365 * Added more localization strings
Diffstat (limited to 'webapp/components/admin_console/admin_sidebar.jsx')
-rw-r--r--webapp/components/admin_console/admin_sidebar.jsx129
1 files changed, 73 insertions, 56 deletions
diff --git a/webapp/components/admin_console/admin_sidebar.jsx b/webapp/components/admin_console/admin_sidebar.jsx
index 5c02f419e..d812b83fd 100644
--- a/webapp/components/admin_console/admin_sidebar.jsx
+++ b/webapp/components/admin_console/admin_sidebar.jsx
@@ -175,6 +175,7 @@ export default class AdminSidebar extends React.Component {
}
render() {
+ let oauthSettings = null;
let ldapSettings = null;
let samlSettings = null;
let complianceSettings = null;
@@ -184,69 +185,93 @@ export default class AdminSidebar extends React.Component {
let policy = null;
if (window.mm_config.BuildEnterpriseReady === 'true') {
- if (window.mm_license.IsLicensed === 'true') {
- if (global.window.mm_license.LDAP === 'true') {
- ldapSettings = (
- <AdminSidebarSection
- name='ldap'
- title={
- <FormattedMessage
- id='admin.sidebar.ldap'
- defaultMessage='LDAP'
- />
- }
+ license = (
+ <AdminSidebarSection
+ name='license'
+ title={
+ <FormattedMessage
+ id='admin.sidebar.license'
+ defaultMessage='Edition and License'
/>
- );
- }
+ }
+ />
+ );
+ }
- if (global.window.mm_license.SAML === 'true') {
- samlSettings = (
- <AdminSidebarSection
- name='saml'
- title={
- <FormattedMessage
- id='admin.sidebar.saml'
- defaultMessage='SAML'
- />
- }
- />
- );
- }
+ if (window.mm_license.IsLicensed === 'true') {
+ if (global.window.mm_license.LDAP === 'true') {
+ ldapSettings = (
+ <AdminSidebarSection
+ name='ldap'
+ title={
+ <FormattedMessage
+ id='admin.sidebar.ldap'
+ defaultMessage='LDAP'
+ />
+ }
+ />
+ );
+ }
- if (global.window.mm_license.Compliance === 'true') {
- complianceSettings = (
- <AdminSidebarSection
- name='compliance'
- title={
- <FormattedMessage
- id='admin.sidebar.compliance'
- defaultMessage='Compliance'
- />
- }
- />
- );
- }
+ if (global.window.mm_license.SAML === 'true') {
+ samlSettings = (
+ <AdminSidebarSection
+ name='saml'
+ title={
+ <FormattedMessage
+ id='admin.sidebar.saml'
+ defaultMessage='SAML'
+ />
+ }
+ />
+ );
+ }
- policy = (
+ if (global.window.mm_license.Compliance === 'true') {
+ complianceSettings = (
<AdminSidebarSection
- name='policy'
+ name='compliance'
title={
<FormattedMessage
- id='admin.sidebar.policy'
- defaultMessage='Policy'
+ id='admin.sidebar.compliance'
+ defaultMessage='Compliance'
/>
}
/>
);
}
- license = (
+ oauthSettings = (
<AdminSidebarSection
- name='license'
+ name='oauth'
title={
<FormattedMessage
- id='admin.sidebar.license'
- defaultMessage='Edition and License'
+ id='admin.sidebar.oauth'
+ defaultMessage='OAuth 2.0'
+ />
+ }
+ />
+ );
+
+ policy = (
+ <AdminSidebarSection
+ name='policy'
+ title={
+ <FormattedMessage
+ id='admin.sidebar.policy'
+ defaultMessage='Policy'
+ />
+ }
+ />
+ );
+ } else {
+ oauthSettings = (
+ <AdminSidebarSection
+ name='gitlab'
+ title={
+ <FormattedMessage
+ id='admin.sidebar.gitlab'
+ defaultMessage='GitLab'
/>
}
/>
@@ -396,15 +421,7 @@ export default class AdminSidebar extends React.Component {
/>
}
/>
- <AdminSidebarSection
- name='gitlab'
- title={
- <FormattedMessage
- id='admin.sidebar.gitlab'
- defaultMessage='GitLab'
- />
- }
- />
+ {oauthSettings}
{ldapSettings}
{samlSettings}
</AdminSidebarSection>