mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	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: 04b04cf854
Author-Change-Id: IB#1105130
			
			
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							3a500cf8c4
						
					
				
				
					commit
					839daa85aa
				
			| @@ -343,6 +343,7 @@ func Contexter() macaron.Handler { | ||||
|  | ||||
| 		ctx.Data["EnableSwagger"] = setting.API.EnableSwagger | ||||
| 		ctx.Data["EnableOpenIDSignIn"] = setting.Service.EnableOpenIDSignIn | ||||
| 		ctx.Data["DisableMigrations"] = setting.Repository.DisableMigrations | ||||
|  | ||||
| 		c.Map(ctx) | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user