Fix the "404 NOT FOUND" error on GitWeb / Gerrit 2.5.
The problem was about projectOwner (or administrator) not being able to browse through GitWeb, even if effectively authorised to see all project branches and permissions. The "project.allRefsAreVisible()" alone did not allow visibility to even the project owner and Gerrit administrators because they had no direct "read" permissions to refs/meta/config (this was implicitly implied by the ownership but not included in GitWebServlet) Change-Id: I93bfade1765cb7c834c9865d86a57304b497b9ed
This commit is contained in:

committed by
Edwin Kempin

parent
a319d358d6
commit
e935f4c87f
@@ -370,7 +370,7 @@ class GitWebServlet extends HttpServlet {
|
||||
final ProjectControl project;
|
||||
try {
|
||||
project = projectControl.validateFor(nameKey);
|
||||
if (!project.allRefsAreVisible()) {
|
||||
if (!project.allRefsAreVisible() && !project.isOwner()) {
|
||||
// Pretend the project doesn't exist
|
||||
throw new NoSuchProjectException(nameKey);
|
||||
}
|
||||
|
Reference in New Issue
Block a user