on admin page, show warning when user hasn't enabled "check updates"

and send Accept-header when fetching changelog, so we can show an html version
instead of json when requested by regular browsers.
This commit is contained in:
Mechiel Lukkien
2023-02-27 15:03:37 +01:00
parent d3590caa2e
commit 67c97c6499
4 changed files with 22 additions and 1 deletions

View File

@ -1520,3 +1520,8 @@ func (Admin) LogLevelSet(ctx context.Context, pkg string, levelStr string) {
func (Admin) LogLevelRemove(ctx context.Context, pkg string) {
mox.Conf.LogLevelRemove(pkg)
}
// CheckUpdatesEnabled returns whether checking for updates is enabled.
func (Admin) CheckUpdatesEnabled(ctx context.Context) bool {
return mox.Conf.Static.CheckUpdates
}