mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Fix javascript error when an anonymous user visiting migration page (#32144)
This PR fixes javascript errors when an anonymous user visits the
migration page.
It also makes task view checking more restrictive.
The router moved from `/user/task/{id}/status` to
`/username/reponame/-/migrate/status` because it's a migrate status.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
			
			
This commit is contained in:
		| @@ -614,7 +614,10 @@ func RepoAssignment(ctx *Context) context.CancelFunc { | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	isHomeOrSettings := ctx.Link == ctx.Repo.RepoLink || ctx.Link == ctx.Repo.RepoLink+"/settings" || strings.HasPrefix(ctx.Link, ctx.Repo.RepoLink+"/settings/") | ||||
| 	isHomeOrSettings := ctx.Link == ctx.Repo.RepoLink || | ||||
| 		ctx.Link == ctx.Repo.RepoLink+"/settings" || | ||||
| 		strings.HasPrefix(ctx.Link, ctx.Repo.RepoLink+"/settings/") || | ||||
| 		ctx.Link == ctx.Repo.RepoLink+"/-/migrate/status" | ||||
|  | ||||
| 	// Disable everything when the repo is being created | ||||
| 	if ctx.Repo.Repository.IsBeingCreated() || ctx.Repo.Repository.IsBroken() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user