summaryrefslogtreecommitdiffstats
path: root/webapp/utils/license_utils.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-03-06 20:36:20 -0500
committerCorey Hulen <corey@hulen.com>2017-03-06 20:36:20 -0500
commitf8aaf312c119d92ed0d9949e4315a4a1b1035e5f (patch)
tree0ddc03db788a632ae157f69390544949b7428bb5 /webapp/utils/license_utils.jsx
parent3f070fe4b805e660cf796a5f851a0a1121a45fac (diff)
downloadchat-f8aaf312c119d92ed0d9949e4315a4a1b1035e5f.tar.gz
chat-f8aaf312c119d92ed0d9949e4315a4a1b1035e5f.tar.bz2
chat-f8aaf312c119d92ed0d9949e4315a4a1b1035e5f.zip
PLT-5703 Update license expiry timing and text (#5602)
* Update license expiry timing and text * Updating error bar (#5632)
Diffstat (limited to 'webapp/utils/license_utils.jsx')
-rw-r--r--webapp/utils/license_utils.jsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/webapp/utils/license_utils.jsx b/webapp/utils/license_utils.jsx
index c4be1f25e..038e3ca29 100644
--- a/webapp/utils/license_utils.jsx
+++ b/webapp/utils/license_utils.jsx
@@ -1,17 +1,18 @@
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
-import Constants from 'utils/constants.jsx';
-
import LocalizationStore from 'stores/localization_store.jsx';
+const LICENSE_EXPIRY_NOTIFICATION = 1000 * 60 * 60 * 24 * 60; // 60 days
+const LICENSE_GRACE_PERIOD = 1000 * 60 * 60 * 24 * 15; // 15 days
+
export function isLicenseExpiring() {
if (window.mm_license.IsLicensed !== 'true') {
return false;
}
const timeDiff = parseInt(global.window.mm_license.ExpiresAt, 10) - Date.now();
- return timeDiff <= Constants.LICENSE_EXPIRY_NOTIFICATION;
+ return timeDiff <= LICENSE_EXPIRY_NOTIFICATION;
}
export function isLicenseExpired() {
@@ -29,7 +30,7 @@ export function isLicensePastGracePeriod() {
}
const timeDiff = Date.now() - parseInt(global.window.mm_license.ExpiresAt, 10);
- return timeDiff > Constants.LICENSE_GRACE_PERIOD;
+ return timeDiff > LICENSE_GRACE_PERIOD;
}
export function displayExpiryDate() {