Use existing config service for license_type checks

This commit is contained in:
gconsidine
2017-08-01 13:36:05 -04:00
parent bdb2bbbd41
commit 214b72bb8d
5 changed files with 18 additions and 2 deletions

View File

@@ -11,12 +11,17 @@ function getTruncatedVersion () {
return version;
}
function isOpen () {
return this.get('license_info.license_type') === 'open';
}
function ConfigModel (method, resource, graft) {
BaseModel.call(this, 'config', { cache: true });
this.Constructor = ConfigModel;
this.getTruncatedVersion = getTruncatedVersion;
this.isOpen = isOpen;
return this.create(method, resource, graft);
}