diff options
Diffstat (limited to 'app/controllers/projects/settings/repository_controller.rb')
-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, |