mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Add error direclty when user tries to create new repo and limit already hit (#1767)
This commit is contained in:
		
				
					committed by
					
						
						Lunny Xiao
					
				
			
			
				
	
			
			
			
						parent
						
							be5323a05f
						
					
				
				
					commit
					85a7396525
				
			@@ -67,6 +67,10 @@ func checkContextUser(ctx *context.Context, uid int64) *models.User {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// Create render creating repository page
 | 
					// Create render creating repository page
 | 
				
			||||||
func Create(ctx *context.Context) {
 | 
					func Create(ctx *context.Context) {
 | 
				
			||||||
 | 
						if !ctx.User.CanCreateRepo() {
 | 
				
			||||||
 | 
							ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", ctx.User.RepoCreationNum()), tplCreate, nil)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ctx.Data["Title"] = ctx.Tr("new_repo")
 | 
						ctx.Data["Title"] = ctx.Tr("new_repo")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Give default value for template to render.
 | 
						// Give default value for template to render.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user