mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Fix a bug when check if owner is active (#13614)
This commit is contained in:
		@@ -114,7 +114,7 @@ func ServCommand(ctx *macaron.Context) {
 | 
				
			|||||||
		})
 | 
							})
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if !owner.IsActive {
 | 
						if !owner.IsOrganization() && !owner.IsActive {
 | 
				
			||||||
		ctx.JSON(http.StatusForbidden, map[string]interface{}{
 | 
							ctx.JSON(http.StatusForbidden, map[string]interface{}{
 | 
				
			||||||
			"results": results,
 | 
								"results": results,
 | 
				
			||||||
			"type":    "ForbiddenError",
 | 
								"type":    "ForbiddenError",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -104,7 +104,7 @@ func HTTP(ctx *context.Context) {
 | 
				
			|||||||
		ctx.NotFoundOrServerError("GetUserByName", models.IsErrUserNotExist, err)
 | 
							ctx.NotFoundOrServerError("GetUserByName", models.IsErrUserNotExist, err)
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if !owner.IsActive {
 | 
						if !owner.IsOrganization() && !owner.IsActive {
 | 
				
			||||||
		ctx.HandleText(http.StatusForbidden, "Repository cannot be accessed. You cannot push or open issues/pull-requests.")
 | 
							ctx.HandleText(http.StatusForbidden, "Repository cannot be accessed. You cannot push or open issues/pull-requests.")
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user