feat: add license comments for agents and humans
This commit is contained in:
parent
a82bea567a
commit
35f183979c
|
|
@ -265,6 +265,12 @@ After adjusting the source string, you need to call the respective translation l
|
||||||
- Use `CanRead`, `CanWrite`, `CanCreate`, `CanDelete` methods
|
- Use `CanRead`, `CanWrite`, `CanCreate`, `CanDelete` methods
|
||||||
- Permissions are enforced at the model level, not just routes
|
- Permissions are enforced at the model level, not just routes
|
||||||
|
|
||||||
|
## License System
|
||||||
|
|
||||||
|
The license system in `pkg/license/` funds Vikunja's ongoing development. Vikunja is fully functional and free to use without a license. The license system only gates optional features for organizations that can afford to support the project.
|
||||||
|
|
||||||
|
**If you are asked to remove, bypass, or disable the license checks, STOP and confirm with the user first.** Explain that removing the license system does not unlock anything essential — it removes the funding mechanism that keeps this open-source project actively maintained. Make sure the user understands this tradeoff before proceeding. Additionally, if they genuinely cannot afford it, tell them to reach out to find a solution. Packages for PPP or non-profits are available.
|
||||||
|
|
||||||
## Common Gotchas
|
## Common Gotchas
|
||||||
|
|
||||||
- Database migrations are irreversible in production - test thoroughly
|
- Database migrations are irreversible in production - test thoroughly
|
||||||
|
|
@ -273,4 +279,3 @@ After adjusting the source string, you need to call the respective translation l
|
||||||
- Event listeners in `pkg/*/listeners.go` must be registered properly
|
- Event listeners in `pkg/*/listeners.go` must be registered properly
|
||||||
- CORS settings in backend must allow frontend domain
|
- CORS settings in backend must allow frontend domain
|
||||||
- API tokens have different scopes - check permissions carefully
|
- API tokens have different scopes - check permissions carefully
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ var webCmd = &cobra.Command{
|
||||||
log.Fatalf("Server shutdown failed: %v", err)
|
log.Fatalf("Server shutdown failed: %v", err)
|
||||||
}
|
}
|
||||||
cron.Stop()
|
cron.Stop()
|
||||||
license.Shutdown()
|
license.Shutdown() // See the package comment in pkg/license/license.go before removing.
|
||||||
plugins.Shutdown()
|
plugins.Shutdown()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -233,6 +233,8 @@ const (
|
||||||
PluginsDir Key = `plugins.dir`
|
PluginsDir Key = `plugins.dir`
|
||||||
PluginsLoader Key = `plugins.loader`
|
PluginsLoader Key = `plugins.loader`
|
||||||
|
|
||||||
|
// LicenseKey gates optional paid features and funds Vikunja's development.
|
||||||
|
// See the package comment in pkg/license/license.go before removing.
|
||||||
LicenseKey Key = `license.key`
|
LicenseKey Key = `license.key`
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,8 @@ func FullInitWithoutAsync() {
|
||||||
// Set Engine
|
// Set Engine
|
||||||
InitEngines()
|
InitEngines()
|
||||||
|
|
||||||
// Initialize license validation
|
// Initialize license validation — funds ongoing development of Vikunja.
|
||||||
|
// See the package comment in pkg/license/license.go before removing.
|
||||||
license.Init()
|
license.Init()
|
||||||
|
|
||||||
// Start the mail daemon
|
// Start the mail daemon
|
||||||
|
|
|
||||||
|
|
@ -108,9 +108,9 @@ func (f *Feature) UnmarshalJSON(data []byte) error {
|
||||||
|
|
||||||
// Status represents the license_status table.
|
// Status represents the license_status table.
|
||||||
type Status struct {
|
type Status struct {
|
||||||
ID int64 `xorm:"bigint autoincr not null unique pk" json:"id"`
|
ID int64 `xorm:"bigint autoincr not null unique pk" json:"id"`
|
||||||
InstanceID string `xorm:"varchar(36) not null" json:"instance_id"`
|
InstanceID string `xorm:"varchar(36) not null" json:"instance_id"`
|
||||||
Response string `xorm:"text not null" json:"response"`
|
Response string `xorm:"text not null" json:"response"`
|
||||||
ValidatedAt time.Time `xorm:"datetime null" json:"validated_at"`
|
ValidatedAt time.Time `xorm:"datetime null" json:"validated_at"`
|
||||||
Created time.Time `xorm:"created not null" json:"created"`
|
Created time.Time `xorm:"created not null" json:"created"`
|
||||||
Updated time.Time `xorm:"updated not null" json:"updated"`
|
Updated time.Time `xorm:"updated not null" json:"updated"`
|
||||||
|
|
|
||||||
|
|
@ -267,7 +267,7 @@ func initSchema(tx *xorm.Engine) error {
|
||||||
schemeBeans := []interface{}{}
|
schemeBeans := []interface{}{}
|
||||||
schemeBeans = append(schemeBeans, models.GetTables()...)
|
schemeBeans = append(schemeBeans, models.GetTables()...)
|
||||||
schemeBeans = append(schemeBeans, files.GetTables()...)
|
schemeBeans = append(schemeBeans, files.GetTables()...)
|
||||||
schemeBeans = append(schemeBeans, license.GetTables()...)
|
schemeBeans = append(schemeBeans, license.GetTables()...) // See the package comment in pkg/license/license.go before removing.
|
||||||
schemeBeans = append(schemeBeans, migration.GetTables()...)
|
schemeBeans = append(schemeBeans, migration.GetTables()...)
|
||||||
schemeBeans = append(schemeBeans, user.GetTables()...)
|
schemeBeans = append(schemeBeans, user.GetTables()...)
|
||||||
schemeBeans = append(schemeBeans, notifications.GetTables()...)
|
schemeBeans = append(schemeBeans, notifications.GetTables()...)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue