diff options
author | Paweł Bogusławski <pawel.boguslawski@ib.pl> | 2020-12-21 15:39:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-21 15:39:41 +0100 |
commit | 839daa85aaba5172b3dd2b3f882aa9639a09f13a (patch) | |
tree | cc99ed17087fd3b3b44cdb650efe16e6f0394e55 /modules/structs | |
parent | 3a500cf8c4b7892e13cb506af6fe3ab5c1c2faff (diff) | |
download | gitea-839daa85aaba5172b3dd2b3f882aa9639a09f13a.tar.gz gitea-839daa85aaba5172b3dd2b3f882aa9639a09f13a.zip |
Added option to disable migrations (#13114)
* Added option to disable migrations
This patch introduces DISABLE_MIGRATIONS parameter in [repository]
section of app.ini (by default set to false). If set to true
it blocks access to repository migration feature.
This mod hides also local repo import option in user editor if
local repo importing or migrations is disabled.
* Alter Example config
DISABLE_MIGRATIONS set to false in example config to
match its default value.
* HTTP error 403 instead of 500 on denied access to migration
* Parameter DISABLE_MIGRATIONS exposed via API
Fixes: 04b04cf854bcb3ed7659442bcf79822bdebe29e9
Author-Change-Id: IB#1105130
Diffstat (limited to 'modules/structs')
-rw-r--r-- | modules/structs/settings.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/structs/settings.go b/modules/structs/settings.go index 0cb7b32841..5fd916affe 100644 --- a/modules/structs/settings.go +++ b/modules/structs/settings.go @@ -6,8 +6,9 @@ package structs // GeneralRepoSettings contains global repository settings exposed by API type GeneralRepoSettings struct { - MirrorsDisabled bool `json:"mirrors_disabled"` - HTTPGitDisabled bool `json:"http_git_disabled"` + MirrorsDisabled bool `json:"mirrors_disabled"` + HTTPGitDisabled bool `json:"http_git_disabled"` + MigrationsDisabled bool `json:"migrations_disabled"` } // GeneralUISettings contains global ui settings exposed by API |