diff options
| author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-02-28 21:14:25 +0100 |
|---|---|---|
| committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-02-28 21:14:25 +0100 |
| commit | 79a5e7fb539dc6df7de590efb69fb9ab9d4614eb (patch) | |
| tree | 951e2f3194c4b4d5488864791a9a94afe7122280 /lib/api/internal.rb | |
| parent | 729391fbfce4dea58478b65c684a24a1bfd125a2 (diff) | |
| parent | 7e424eb852716495073881710e8a8851b4a4cd5a (diff) | |
| download | gitlab-ce-79a5e7fb539dc6df7de590efb69fb9ab9d4614eb.tar.gz | |
Merge commit '7e424eb852716495073881710e8a8851b4a4cd5a' into object-storage-ee-to-ce-backport
Diffstat (limited to 'lib/api/internal.rb')
| -rw-r--r-- | lib/api/internal.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb index 063f0d6599c..9285fb90cdc 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -42,11 +42,14 @@ module API end access_checker_klass = wiki? ? Gitlab::GitAccessWiki : Gitlab::GitAccess - access_checker = access_checker_klass - .new(actor, project, protocol, authentication_abilities: ssh_authentication_abilities, redirected_path: redirected_path) + access_checker = access_checker_klass.new(actor, project, + protocol, authentication_abilities: ssh_authentication_abilities, + namespace_path: namespace_path, project_path: project_path, + redirected_path: redirected_path) begin access_checker.check(params[:action], params[:changes]) + @project ||= access_checker.project rescue Gitlab::GitAccess::UnauthorizedError, Gitlab::GitAccess::NotFoundError => e return { status: false, message: e.message } end @@ -207,8 +210,11 @@ module API # A user is not guaranteed to be returned; an orphaned write deploy # key could be used if user - redirect_message = Gitlab::Checks::ProjectMoved.fetch_redirect_message(user.id, project.id) + redirect_message = Gitlab::Checks::ProjectMoved.fetch_message(user.id, project.id) + project_created_message = Gitlab::Checks::ProjectCreated.fetch_message(user.id, project.id) + output[:redirected_message] = redirect_message if redirect_message + output[:project_created_message] = project_created_message if project_created_message end output |
