diff options
Diffstat (limited to 'webapp/utils')
-rw-r--r-- | webapp/utils/constants.jsx | 2 | ||||
-rw-r--r-- | webapp/utils/license_utils.jsx | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx index fafad9f44..cb55da9b8 100644 --- a/webapp/utils/constants.jsx +++ b/webapp/utils/constants.jsx @@ -885,8 +885,6 @@ export const Constants = { BOT_NAME: 'BOT', MAX_PREV_MSGS: 100, POST_COLLAPSE_TIMEOUT: 1000 * 60 * 5, // five minutes - LICENSE_EXPIRY_NOTIFICATION: 1000 * 60 * 60 * 24 * 15, // 15 days - LICENSE_GRACE_PERIOD: 1000 * 60 * 60 * 24 * 15, // 15 days PERMISSIONS_ALL: 'all', PERMISSIONS_CHANNEL_ADMIN: 'channel_admin', PERMISSIONS_TEAM_ADMIN: 'team_admin', 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() { |