Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Merge branch 'fix/server-error-if-access-unsupported-repo' of dlab/hive
Browse files Browse the repository at this point in the history
from pull-request 1252

* refs/heads/fix/server-error-if-access-unsupported-repo:
  git,svn: Respond 404 for unsupported repository

Reviewed-by: 김지한 <kim.jihan@navercorp.com>
Reviewed-by: 백기선 <keesun.baik@navercorp.com>
  • Loading branch information
백기선 committed Aug 19, 2014
2 parents f1bb99c + bb52e67 commit 696307f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/GitApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public static Result service(String ownerName, String projectName, String servic
return notFound();
}

if (!project.vcs.equals(RepositoryService.VCS_GIT)) {
return notFound();
}

models.User user = UserApp.currentUser();

if (!isAllowed(project, service)) {
Expand Down
4 changes: 4 additions & 0 deletions app/controllers/SvnApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ public static Result service() throws ServletException, IOException, Interrupted
return notFound();
}

if (!project.vcs.equals(RepositoryService.VCS_SUBVERSION)) {
return notFound();
}

PlayRepository repository = RepositoryService.getRepository(project);
if (!AccessControl.isAllowed(currentUser, repository.asResource(),
getRequestedOperation(request().method()))) {
Expand Down

0 comments on commit 696307f

Please sign in to comment.