Fix users cannot visit issue attachment bug (#25019)
Caused by #24362 Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
parent
48bfea6705
commit
5d23c885ed
2 changed files with 3 additions and 5 deletions
|
@ -110,11 +110,6 @@ func ServeAttachment(ctx *context.Context, uuid string) {
|
|||
return
|
||||
}
|
||||
} else { // If we have the repository we check access
|
||||
context.CheckRepoScopedToken(ctx, repository)
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
|
||||
perm, err := access_model.GetUserRepoPermission(ctx, repository, ctx.Doer)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "GetUserRepoPermission", err.Error())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue