feat: add demo mode flag
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Related to vikunja/frontend#2453
This commit is contained in:
parent
b3a847e581
commit
97b5cd306f
@ -59,6 +59,9 @@ service:
|
||||
# The maximum size clients will be able to request for user avatars.
|
||||
# If clients request a size bigger than this, it will be changed on the fly.
|
||||
maxavatarsize: 1024
|
||||
# If set to true, the frontend will show a big red warning not to use this instance for real data as it will be cleared out.
|
||||
# You probably don't need to set this value, it was created specifically for usage on [try](https://try.vikunja.io).
|
||||
demomode: false
|
||||
|
||||
database:
|
||||
# Database type to use. Supported types are mysql, postgres and sqlite.
|
||||
|
@ -333,6 +333,18 @@ Full path: `service.maxavatarsize`
|
||||
Environment path: `VIKUNJA_SERVICE_MAXAVATARSIZE`
|
||||
|
||||
|
||||
### demomode
|
||||
|
||||
If set to true, the frontend will show a big red warning not to use this instance for real data as it will be cleared out.
|
||||
You probably don't need to set this value, it was created specifically for usage on [try](https://try.vikunja.io).
|
||||
|
||||
Default: `false`
|
||||
|
||||
Full path: `service.demomode`
|
||||
|
||||
Environment path: `VIKUNJA_SERVICE_DEMOMODE`
|
||||
|
||||
|
||||
---
|
||||
|
||||
## database
|
||||
|
@ -49,6 +49,7 @@ const (
|
||||
ServiceRootpath Key = `service.rootpath`
|
||||
ServiceStaticpath Key = `service.staticpath`
|
||||
ServiceMaxItemsPerPage Key = `service.maxitemsperpage`
|
||||
ServiceDemoMode Key = `service.demomode`
|
||||
// Deprecated: Use metrics.enabled
|
||||
ServiceEnableMetrics Key = `service.enablemetrics`
|
||||
ServiceMotd Key = `service.motd`
|
||||
@ -300,6 +301,7 @@ func InitDefaultConfig() {
|
||||
ServiceEnableEmailReminders.setDefault(true)
|
||||
ServiceEnableUserDeletion.setDefault(true)
|
||||
ServiceMaxAvatarSize.setDefault(1024)
|
||||
ServiceDemoMode.setDefault(false)
|
||||
|
||||
// Auth
|
||||
AuthLocalEnabled.setDefault(true)
|
||||
|
@ -49,6 +49,7 @@ type vikunjaInfos struct {
|
||||
EmailRemindersEnabled bool `json:"email_reminders_enabled"`
|
||||
UserDeletionEnabled bool `json:"user_deletion_enabled"`
|
||||
TaskCommentsEnabled bool `json:"task_comments_enabled"`
|
||||
DemoModeEnabled bool `json:"demo_mode_enabled"`
|
||||
}
|
||||
|
||||
type authInfo struct {
|
||||
@ -92,6 +93,7 @@ func Info(c echo.Context) error {
|
||||
EmailRemindersEnabled: config.ServiceEnableEmailReminders.GetBool(),
|
||||
UserDeletionEnabled: config.ServiceEnableUserDeletion.GetBool(),
|
||||
TaskCommentsEnabled: config.ServiceEnableTaskComments.GetBool(),
|
||||
DemoModeEnabled: config.ServiceDemoMode.GetBool(),
|
||||
AvailableMigrators: []string{
|
||||
(&vikunja_file.FileMigrator{}).Name(),
|
||||
(&ticktick.Migrator{}).Name(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user