소스 검색

Fix a bug when check if owner is active (#13612)

tags/v1.15.0-dev
Lunny Xiao 3 년 전
부모
커밋
5a991ec519
No account linked to committer's email address
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1
    1
      routers/private/serv.go
  2. 1
    1
      routers/repo/http.go

+ 1
- 1
routers/private/serv.go 파일 보기

@@ -114,7 +114,7 @@ func ServCommand(ctx *macaron.Context) {
})
return
}
if !owner.IsActive {
if !owner.IsOrganization() && !owner.IsActive {
ctx.JSON(http.StatusForbidden, map[string]interface{}{
"results": results,
"type": "ForbiddenError",

+ 1
- 1
routers/repo/http.go 파일 보기

@@ -105,7 +105,7 @@ func HTTP(ctx *context.Context) {
ctx.NotFoundOrServerError("GetUserByName", models.IsErrUserNotExist, err)
return
}
if !owner.IsActive {
if !owner.IsOrganization() && !owner.IsActive {
ctx.HandleText(http.StatusForbidden, "Repository cannot be accessed. You cannot push or open issues/pull-requests.")
return
}

Loading…
취소
저장