Skip to content

Commit

Permalink
Assume that not found project on GitLab means no access
Browse files Browse the repository at this point in the history
  • Loading branch information
mlowicki committed Oct 15, 2018
1 parent b443cc6 commit 1a91c13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/auth/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ func (g *GitLabAuthorizer) GetProjectAccessLevel(r *http.Request, group string,
if err != nil {
switch e := err.(type) {
case *gitlab.ErrorResponse:
if e.Response.StatusCode == http.StatusUnauthorized {
code := e.Response.StatusCode
if code == http.StatusUnauthorized || code == http.StatusNotFound {
return auth.NoAccess, nil
}
return auth.NoAccess, err
Expand Down

0 comments on commit 1a91c13

Please sign in to comment.