mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-07 08:57:12 +00:00
13 lines
328 B
Go
13 lines
328 B
Go
package licensing
|
|
|
|
func IsHostedSubscriptionValid(subState SubscriptionState, hasTrialEnd bool) bool {
|
|
switch subState {
|
|
case SubStateActive, SubStateGrace:
|
|
return true
|
|
case SubStateTrial:
|
|
// Only allow trials with an explicit end date to prevent "infinite free Cloud".
|
|
return hasTrialEnd
|
|
default:
|
|
return false
|
|
}
|
|
}
|