(_license: License | null)
| 157 | } |
| 158 | |
| 159 | export const getEntitlements = (_license: License | null): Entitlement[] => { |
| 160 | const offlineLicense = getValidOfflineLicense(); |
| 161 | if (offlineLicense) { |
| 162 | return ALL_ENTITLEMENTS as unknown as Entitlement[]; |
| 163 | } |
| 164 | |
| 165 | const onlineLicense = getValidOnlineLicense(_license); |
| 166 | if (onlineLicense) { |
| 167 | return onlineLicense.entitlements as unknown as Entitlement[]; |
| 168 | } |
| 169 | else { |
| 170 | return []; |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | export const hasEntitlement = (entitlement: Entitlement, _license: License | null) => { |
| 175 | const entitlements = getEntitlements(_license); |
no test coverage detected