mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Backport of #5872 to v1.7 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		@@ -85,7 +85,7 @@ func sudo() macaron.Handler {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if len(sudo) > 0 {
 | 
							if len(sudo) > 0 {
 | 
				
			||||||
			if ctx.User.IsAdmin {
 | 
								if ctx.IsSigned && ctx.User.IsAdmin {
 | 
				
			||||||
				user, err := models.GetUserByName(sudo)
 | 
									user, err := models.GetUserByName(sudo)
 | 
				
			||||||
				if err != nil {
 | 
									if err != nil {
 | 
				
			||||||
					if models.IsErrUserNotExist(err) {
 | 
										if models.IsErrUserNotExist(err) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user