diff options
Diffstat (limited to 'webapp/components/admin_console')
-rw-r--r-- | webapp/components/admin_console/compliance_reports.jsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/webapp/components/admin_console/compliance_reports.jsx b/webapp/components/admin_console/compliance_reports.jsx index a93f7a17c..9bde450ff 100644 --- a/webapp/components/admin_console/compliance_reports.jsx +++ b/webapp/components/admin_console/compliance_reports.jsx @@ -25,6 +25,7 @@ export default class ComplianceReports extends React.Component { this.getDateTime = this.getDateTime.bind(this); this.state = { + enabled: AdminStore.getConfig().ComplianceSettings.Enable, reports: AdminStore.getComplianceReports(), serverError: null }; @@ -33,7 +34,7 @@ export default class ComplianceReports extends React.Component { componentDidMount() { AdminStore.addComplianceReportsChangeListener(this.onComplianceReportsListenerChange); - if (global.window.mm_license.IsLicensed !== 'true' || global.window.mm_config.EnableCompliance !== 'true') { + if (global.window.mm_license.IsLicensed !== 'true' || !this.state.enabled) { return; } @@ -112,7 +113,7 @@ export default class ComplianceReports extends React.Component { render() { var content = null; - if (global.window.mm_license.IsLicensed !== 'true' || global.window.mm_config.EnableCompliance !== 'true') { + if (global.window.mm_license.IsLicensed !== 'true' || !this.state.enabled) { return <div/>; } |