mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fix correct usage of teams (#17732)
- `.Teams` isn't a field on the User type, thus using the seperate loaded teams. - Add a space between `PathEscape` and argument. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		@@ -69,6 +69,12 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
 | 
			
		||||
	org := ctx.Org.Organization
 | 
			
		||||
	ctx.Data["Org"] = org
 | 
			
		||||
 | 
			
		||||
	teams, err := org.LoadTeams()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		ctx.ServerError("LoadTeams", err)
 | 
			
		||||
	}
 | 
			
		||||
	ctx.Data["OrgTeams"] = teams
 | 
			
		||||
 | 
			
		||||
	// Admin has super access.
 | 
			
		||||
	if ctx.IsSigned && ctx.User.IsAdmin {
 | 
			
		||||
		ctx.Org.IsOwner = true
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user