mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
feature (license): mechanism to override default license
This commit is contained in:
parent
3b48a5fa80
commit
1c3736e6f2
1 changed files with 3 additions and 3 deletions
|
|
@ -15,8 +15,9 @@ type license struct {
|
|||
}
|
||||
|
||||
func init() {
|
||||
lenv := os.Getenv("LICENSE")
|
||||
Hooks.Register.Onload(func() {
|
||||
if LICENSE != "agpl" {
|
||||
if LICENSE != "agpl" && lenv == "" {
|
||||
return
|
||||
}
|
||||
data, err := DecryptString(fmt.Sprintf("%-16s", "filestash"), Config.Get("general.license").Schema(func(f *FormElement) *FormElement {
|
||||
|
|
@ -27,9 +28,8 @@ func init() {
|
|||
f.Type = "text"
|
||||
f.Placeholder = "License Key"
|
||||
f.Description = "Reach out to support@filestash.app to get your license"
|
||||
lenv := os.Getenv("LICENSE")
|
||||
if lenv != "" {
|
||||
f.Value = os.Getenv("LICENSE")
|
||||
f.Value = lenv
|
||||
f.ReadOnly = true
|
||||
}
|
||||
return f
|
||||
|
|
|
|||
Loading…
Reference in a new issue