From 2dcc14b4d98a6a8aa0173e6ae74930f13336484f Mon Sep 17 00:00:00 2001 From: t-tsutsumi Date: Tue, 9 May 2017 04:55:55 +0900 Subject: [PATCH] Fix incorrect redirect URL and authorization in Update branch feature --- .../gitbucket/core/controller/PullRequestsController.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/gitbucket/core/controller/PullRequestsController.scala b/src/main/scala/gitbucket/core/controller/PullRequestsController.scala index cf8c49b64..2ab0e96e4 100644 --- a/src/main/scala/gitbucket/core/controller/PullRequestsController.scala +++ b/src/main/scala/gitbucket/core/controller/PullRequestsController.scala @@ -153,7 +153,7 @@ trait PullRequestsControllerBase extends ControllerBase { } getOrElse NotFound() }) - post("/:owner/:repository/pull/:id/update_branch")(writableUsersOnly { baseRepository => + post("/:owner/:repository/pull/:id/update_branch")(readableUsersOnly { baseRepository => (for { issueId <- params("id").toIntOpt loginAccount <- context.loginAccount @@ -217,7 +217,7 @@ trait PullRequestsControllerBase extends ControllerBase { } } } - redirect(s"/${repository.owner}/${repository.name}/pull/${issueId}") + redirect(s"/${baseRepository.owner}/${baseRepository.name}/pull/${issueId}") }) getOrElse NotFound() })