diff options
Diffstat (limited to 'app/controllers/projects/blob_controller.rb')
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index d969e7bf771..1568d9966dd 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -10,6 +10,8 @@ class Projects::BlobController < Projects::ApplicationController include RedirectsForMissingPathOnTree include SourcegraphDecorator include DiffHelper + include RedisTracking + extend ::Gitlab::Utils::Override prepend_before_action :authenticate_user!, only: [:edit] @@ -33,8 +35,11 @@ class Projects::BlobController < Projects::ApplicationController before_action only: :show do push_frontend_feature_flag(:code_navigation, @project, default_enabled: true) push_frontend_feature_flag(:suggest_pipeline) if experiment_enabled?(:suggest_pipeline) + push_frontend_feature_flag(:gitlab_ci_yml_preview, @project, default_enabled: false) end + track_redis_hll_event :create, :update, name: 'g_edit_by_sfe', feature: :track_editor_edit_actions, feature_default_enabled: true + def new commit unless @repository.empty? end @@ -99,8 +104,6 @@ class Projects::BlobController < Projects::ApplicationController end def diff - apply_diff_view_cookie! - @form = Blobs::UnfoldPresenter.new(blob, diff_params) # keep only json rendering when @@ -256,4 +259,9 @@ class Projects::BlobController < Projects::ApplicationController def diff_params params.permit(:full, :since, :to, :bottom, :unfold, :offset, :indent) end + + override :visitor_id + def visitor_id + current_user&.id + end end |