Skip to content

Commit

Permalink
clean up license type return
Browse files Browse the repository at this point in the history
  • Loading branch information
pzl committed Nov 25, 2020
1 parent 9fd6951 commit f64665c
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions x-pack/plugins/security_solution/common/license/license.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,28 @@ export class LicenseService {
return this.observable;
}

public isGoldPlus(): boolean | undefined {
public isGoldPlus(): boolean {
return (
this.licenseInformation?.isAvailable &&
this.licenseInformation?.isActive &&
this.licenseInformation?.hasAtLeast('gold')
(this.licenseInformation?.isAvailable &&
this.licenseInformation?.isActive &&
this.licenseInformation?.hasAtLeast('gold')) ||
false
);
}
public isPlatinumPlus(): boolean | undefined {
public isPlatinumPlus(): boolean {
return (
this.licenseInformation?.isAvailable &&
this.licenseInformation?.isActive &&
this.licenseInformation?.hasAtLeast('platinum')
(this.licenseInformation?.isAvailable &&
this.licenseInformation?.isActive &&
this.licenseInformation?.hasAtLeast('platinum')) ||
false
);
}
public isEnterprise(): boolean | undefined {
public isEnterprise(): boolean {
return (
this.licenseInformation?.isAvailable &&
this.licenseInformation?.isActive &&
this.licenseInformation?.hasAtLeast('enterprise')
(this.licenseInformation?.isAvailable &&
this.licenseInformation?.isActive &&
this.licenseInformation?.hasAtLeast('enterprise')) ||
false
);
}
}

0 comments on commit f64665c

Please sign in to comment.