diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-03 13:55:14 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-07 11:59:51 +0200 |
commit | 9a13059332a0c81b3a953f57bb9e40346eba951d (patch) | |
tree | 8f2806ec52b77cd212a19f9756c837606d988c62 /app/controllers/projects/settings | |
parent | 2d84de9ec90b87ee4e1e10ce1a4a9d00b07c39e7 (diff) | |
download | gitlab-ce-9a13059332a0c81b3a953f57bb9e40346eba951d.tar.gz |
Backports every CE related change from ee-5484 to CE
Diffstat (limited to 'app/controllers/projects/settings')
-rw-r--r-- | app/controllers/projects/settings/repository_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/projects/settings/repository_controller.rb b/app/controllers/projects/settings/repository_controller.rb index f17056f13e0..a3bb60bb3b2 100644 --- a/app/controllers/projects/settings/repository_controller.rb +++ b/app/controllers/projects/settings/repository_controller.rb @@ -2,6 +2,7 @@ module Projects module Settings class RepositoryController < Projects::ApplicationController before_action :authorize_admin_project! + before_action :remote_mirror, only: [:show] def show render_show @@ -25,6 +26,7 @@ module Projects define_deploy_token define_protected_refs + remote_mirror render 'show' end @@ -41,6 +43,12 @@ module Projects load_gon_index end + def remote_mirror + return unless project.feature_available?(:repository_mirrors) + + @remote_mirror = project.remote_mirrors.first_or_initialize + end + def access_levels_options { create_access_levels: levels_for_dropdown, |