summaryrefslogtreecommitdiff
path: root/app/controllers/projects_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb24
1 files changed, 11 insertions, 13 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index c03a820b384..3744517934a 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -19,9 +19,6 @@ class ProjectsController < Projects::ApplicationController
before_action :redirect_git_extension, only: [:show]
before_action :project, except: [:index, :new, :create, :resolve]
before_action :repository, except: [:index, :new, :create, :resolve]
- before_action :assign_ref_vars, if: -> { action_name == 'show' && repo_exists? }
- before_action :tree,
- if: -> { action_name == 'show' && repo_exists? && project_view_files? }
before_action :project_export_enabled, only: [:export, :download_export, :remove_export, :generate_new_export]
before_action :present_project, only: [:edit]
before_action :authorize_download_code!, only: [:refs]
@@ -34,15 +31,9 @@ class ProjectsController < Projects::ApplicationController
# Project Export Rate Limit
before_action :export_rate_limit, only: [:export, :download_export, :generate_new_export]
- # Experiments
- before_action only: [:new, :create] do
- frontend_experimentation_tracking_data(:new_create_project_ui, 'click_tab')
- push_frontend_experiment(:new_create_project_ui)
- end
-
before_action only: [:edit] do
- push_frontend_feature_flag(:service_desk_custom_address, @project)
push_frontend_feature_flag(:approval_suggestions, @project, default_enabled: true)
+ push_frontend_feature_flag(:allow_editing_commit_messages, @project)
end
layout :determine_layout
@@ -80,8 +71,6 @@ class ProjectsController < Projects::ApplicationController
@project = ::Projects::CreateService.new(current_user, project_params(attributes: project_params_create_attributes)).execute
if @project.saved?
- cookies[:issue_board_welcome_hidden] = { path: project_path(@project), value: nil, expires: Time.zone.at(0) }
-
redirect_to(
project_path(@project, custom_import_params),
notice: _("Project '%{project_name}' was successfully created.") % { project_name: @project.name }
@@ -147,6 +136,8 @@ class ProjectsController < Projects::ApplicationController
end
def show
+ @id, @ref, @path = extract_ref_path
+
if @project.import_in_progress?
redirect_to project_import_path(@project, custom_import_params)
return
@@ -334,7 +325,11 @@ class ProjectsController < Projects::ApplicationController
if can?(current_user, :download_code, @project)
return render 'projects/no_repo' unless @project.repository_exists?
- render 'projects/empty' if @project.empty_repo?
+ if @project.empty_repo?
+ record_experiment_user(:invite_members_empty_project_version_a)
+
+ render 'projects/empty'
+ end
else
if can?(current_user, :read_wiki, @project)
@wiki = @project.wiki
@@ -392,6 +387,8 @@ class ProjectsController < Projects::ApplicationController
wiki_access_level
pages_access_level
metrics_dashboard_access_level
+ analytics_access_level
+ operations_access_level
]
end
@@ -435,6 +432,7 @@ class ProjectsController < Projects::ApplicationController
project_setting_attributes: %i[
show_default_award_emojis
squash_option
+ allow_editing_commit_messages
]
] + [project_feature_attributes: project_feature_attributes]
end