Export LFS & TimeTracking function status (#14753)
This commit is contained in:
parent
db07aedd32
commit
190bd0accd
4 changed files with 23 additions and 9 deletions
|
@ -46,6 +46,8 @@ func TestAPIExposedSettings(t *testing.T) {
|
||||||
MirrorsDisabled: setting.Repository.DisableMirrors,
|
MirrorsDisabled: setting.Repository.DisableMirrors,
|
||||||
HTTPGitDisabled: setting.Repository.DisableHTTPGit,
|
HTTPGitDisabled: setting.Repository.DisableHTTPGit,
|
||||||
MigrationsDisabled: setting.Repository.DisableMigrations,
|
MigrationsDisabled: setting.Repository.DisableMigrations,
|
||||||
|
TimeTrackingDisabled: false,
|
||||||
|
LFSDisabled: !setting.LFS.StartServer,
|
||||||
}, repo)
|
}, repo)
|
||||||
|
|
||||||
attachment := new(api.GeneralAttachmentSettings)
|
attachment := new(api.GeneralAttachmentSettings)
|
||||||
|
|
|
@ -9,6 +9,8 @@ type GeneralRepoSettings struct {
|
||||||
MirrorsDisabled bool `json:"mirrors_disabled"`
|
MirrorsDisabled bool `json:"mirrors_disabled"`
|
||||||
HTTPGitDisabled bool `json:"http_git_disabled"`
|
HTTPGitDisabled bool `json:"http_git_disabled"`
|
||||||
MigrationsDisabled bool `json:"migrations_disabled"`
|
MigrationsDisabled bool `json:"migrations_disabled"`
|
||||||
|
TimeTrackingDisabled bool `json:"time_tracking_disabled"`
|
||||||
|
LFSDisabled bool `json:"lfs_disabled"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GeneralUISettings contains global ui settings exposed by API
|
// GeneralUISettings contains global ui settings exposed by API
|
||||||
|
|
|
@ -60,6 +60,8 @@ func GetGeneralRepoSettings(ctx *context.APIContext) {
|
||||||
MirrorsDisabled: setting.Repository.DisableMirrors,
|
MirrorsDisabled: setting.Repository.DisableMirrors,
|
||||||
HTTPGitDisabled: setting.Repository.DisableHTTPGit,
|
HTTPGitDisabled: setting.Repository.DisableHTTPGit,
|
||||||
MigrationsDisabled: setting.Repository.DisableMigrations,
|
MigrationsDisabled: setting.Repository.DisableMigrations,
|
||||||
|
TimeTrackingDisabled: !setting.Service.EnableTimetracking,
|
||||||
|
LFSDisabled: !setting.LFS.StartServer,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14101,6 +14101,10 @@
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"x-go-name": "HTTPGitDisabled"
|
"x-go-name": "HTTPGitDisabled"
|
||||||
},
|
},
|
||||||
|
"lfs_disabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"x-go-name": "LFSDisabled"
|
||||||
|
},
|
||||||
"migrations_disabled": {
|
"migrations_disabled": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"x-go-name": "MigrationsDisabled"
|
"x-go-name": "MigrationsDisabled"
|
||||||
|
@ -14108,6 +14112,10 @@
|
||||||
"mirrors_disabled": {
|
"mirrors_disabled": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"x-go-name": "MirrorsDisabled"
|
"x-go-name": "MirrorsDisabled"
|
||||||
|
},
|
||||||
|
"time_tracking_disabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"x-go-name": "TimeTrackingDisabled"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||||
|
|
Loading…
Reference in a new issue