mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	* dont insert "-1" in any case to issue.poster_id * Make sure API cant override importand fields * code format * fix lint * WIP test * add missing poster_id * fix test * user.IsGhost handle nil * CI.restart() * make sure no -1 is realy added * CI.restart() * @lunny suggestion remove some not allowed fields * seperate issue.LoadMilestone * load milestone and return it on IssueEdit via API * extend Test for TestAPIEditIssue * fix fixtures * declare allowedColumnsUpdateIssueByAPI only once * Update Year * no var just write id drecty into func cal Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
		@@ -791,6 +791,14 @@ func NewGhostUser() *User {
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsGhost check if user is fake user for a deleted account
 | 
			
		||||
func (u *User) IsGhost() bool {
 | 
			
		||||
	if u == nil {
 | 
			
		||||
		return false
 | 
			
		||||
	}
 | 
			
		||||
	return u.ID == -1 && u.Name == "Ghost"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	reservedUsernames = []string{
 | 
			
		||||
		"attachments",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user