Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

feat(license): grant Pro features in dev mode

rcourtman35120699652c
diff --git a/internal/license/license.go b/internal/license/license.go
index 89aa442f73..9d7cc34fdf 100644
--- a/internal/license/license.go
+++ b/internal/license/license.go
@@ -226,8 +226,8 @@ func (s *Service) IsValid() bool {
// HasFeature checks if the current license grants a feature.
func (s *Service) HasFeature(feature string) bool {
- // In demo mode, grant all Pro features for showcase purposes
- if isDemoMode() {
+ // In demo mode or dev mode, grant all Pro features
+ if isDemoMode() || isDevMode() {
return true
}
@@ -257,6 +257,11 @@ func isDemoMode() bool {
return strings.EqualFold(os.Getenv("PULSE_MOCK_MODE"), "true")
}
+// isDevMode returns true if running in development mode
+func isDevMode() bool {
+ return strings.EqualFold(os.Getenv("PULSE_DEV"), "true")
+}
+
// LicenseState represents the current state of the license
type LicenseState string