diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-03-04 08:20:37 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-03-04 08:20:37 +0000 |
commit | ec7835946a0c981e9b263d2840e68f16eb1b3789 (patch) | |
tree | f02fd29d0367b55a2eb5f701015d73c28a63413e /app/assets/javascripts/lib | |
parent | 615c14b28990489d99371b7ffdb57fe54d463e64 (diff) | |
download | gitlab-ce-ec7835946a0c981e9b263d2840e68f16eb1b3789.tar.gz |
Creates a function to check if repo is EE
Adds EE information to gon
Creates a global vue mixin
Diffstat (limited to 'app/assets/javascripts/lib')
-rw-r--r-- | app/assets/javascripts/lib/utils/common_utils.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/utils/common_utils.js b/app/assets/javascripts/lib/utils/common_utils.js index a73cdb73690..1af6b63efc9 100644 --- a/app/assets/javascripts/lib/utils/common_utils.js +++ b/app/assets/javascripts/lib/utils/common_utils.js @@ -708,6 +708,14 @@ export const NavigationType = { TYPE_RESERVED: 255, }; +/** + * Returns the value of `gon.ee` + * Used to check if it's the EE codebase or the CE one. + * + * @returns Boolean + */ +export const isEE = () => window.gon && window.gon.ee; + window.gl = window.gl || {}; window.gl.utils = { ...(window.gl.utils || {}), |