mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-06 16:16:26 +00:00
30 lines
618 B
Go
30 lines
618 B
Go
package licensing
|
|
|
|
import (
|
|
"os"
|
|
"sort"
|
|
"strings"
|
|
)
|
|
|
|
func devModeFeatures() []string {
|
|
known := allKnownFeatures()
|
|
filtered := make([]string, 0, len(known))
|
|
for _, feature := range known {
|
|
if devModeFeatureEnabled(feature) {
|
|
filtered = append(filtered, feature)
|
|
}
|
|
}
|
|
sort.Strings(filtered)
|
|
return filtered
|
|
}
|
|
|
|
func devModeFeatureEnabled(feature string) bool {
|
|
switch feature {
|
|
case FeatureMultiUser, FeatureWhiteLabel, FeatureUnlimited:
|
|
return false
|
|
case FeatureMultiTenant:
|
|
return strings.EqualFold(strings.TrimSpace(os.Getenv("PULSE_MULTI_TENANT_ENABLED")), "true")
|
|
default:
|
|
return true
|
|
}
|
|
}
|