feat(license): default to Solo tier when no license present
Allow vault to run without a license file by defaulting to Solo tier (free). When no license is found, treat it as valid with Solo tier limits instead of returning an error. This enables free usage with basic features.
This commit is contained in:
@@ -118,7 +118,10 @@ func (m *Manager) Load() error {
|
||||
}
|
||||
|
||||
if licenseData == "" {
|
||||
return ErrNoLicense
|
||||
// No license file - use Solo tier (free)
|
||||
log.Info("No license file found, using Solo tier (free)")
|
||||
m.license = nil // Solo tier uses nil license with defaults
|
||||
return nil
|
||||
}
|
||||
|
||||
// Parse license
|
||||
@@ -144,7 +147,8 @@ func (m *Manager) Load() error {
|
||||
// Validate validates the current license
|
||||
func (m *Manager) Validate() error {
|
||||
if m.license == nil {
|
||||
return ErrNoLicense
|
||||
// No license = Solo tier (free), which is valid
|
||||
return nil
|
||||
}
|
||||
|
||||
// Skip signature validation in development mode
|
||||
@@ -210,7 +214,14 @@ func (m *Manager) verifySignature() error {
|
||||
// Info returns information about the current license
|
||||
func (m *Manager) Info() *Info {
|
||||
if m.license == nil {
|
||||
return nil
|
||||
// Return Solo tier info for unlicensed installations
|
||||
return &Info{
|
||||
Valid: true,
|
||||
Tier: string(TierSolo),
|
||||
ExpiresAt: 0, // Never expires
|
||||
GracePeriod: false,
|
||||
Limits: DefaultLimitsForTier(TierSolo),
|
||||
}
|
||||
}
|
||||
|
||||
now := time.Now().Unix()
|
||||
|
||||
Reference in New Issue
Block a user