Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-02-20 16:49:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-20 16:49:51 +0300
commit71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch)
tree6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /app/controllers/admin
parenta7253423e3403b8c08f8a161e5937e1488f5f407 (diff)
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'app/controllers/admin')
-rw-r--r--app/controllers/admin/application_settings/appearances_controller.rb15
-rw-r--r--app/controllers/admin/jobs_controller.rb4
-rw-r--r--app/controllers/admin/runners_controller.rb32
-rw-r--r--app/controllers/admin/users_controller.rb6
4 files changed, 28 insertions, 29 deletions
diff --git a/app/controllers/admin/application_settings/appearances_controller.rb b/app/controllers/admin/application_settings/appearances_controller.rb
index 3cb31ff756f..719e8e4a913 100644
--- a/app/controllers/admin/application_settings/appearances_controller.rb
+++ b/app/controllers/admin/application_settings/appearances_controller.rb
@@ -46,6 +46,15 @@ class Admin::ApplicationSettings::AppearancesController < Admin::ApplicationCont
redirect_to admin_application_settings_appearances_path, notice: _('Header logo was successfully removed.')
end
+ def pwa_icon
+ @appearance.remove_pwa_icon!
+
+ @appearance.save
+
+ redirect_to admin_application_settings_appearances_path,
+ notice: _('Progressive Web App (PWA) icon was successfully removed.')
+ end
+
def favicon
@appearance.remove_favicon!
@appearance.save
@@ -68,12 +77,16 @@ class Admin::ApplicationSettings::AppearancesController < Admin::ApplicationCont
def allowed_appearance_params
%i[
title
- pwa_short_name
description
+ pwa_name
+ pwa_short_name
+ pwa_description
logo
logo_cache
header_logo
header_logo_cache
+ pwa_icon
+ pwa_icon_cache
favicon
favicon_cache
new_project_guidelines
diff --git a/app/controllers/admin/jobs_controller.rb b/app/controllers/admin/jobs_controller.rb
index ef9264d1615..5ea8c672993 100644
--- a/app/controllers/admin/jobs_controller.rb
+++ b/app/controllers/admin/jobs_controller.rb
@@ -6,6 +6,10 @@ class Admin::JobsController < Admin::ApplicationController
feature_category :continuous_integration
urgency :low
+ before_action do
+ push_frontend_feature_flag(:admin_jobs_vue)
+ end
+
def index
# We need all builds for tabs counters
@all_builds = Ci::JobsFinder.new(current_user: current_user).execute
diff --git a/app/controllers/admin/runners_controller.rb b/app/controllers/admin/runners_controller.rb
index 96fe0c9331d..21a3a0aea0b 100644
--- a/app/controllers/admin/runners_controller.rb
+++ b/app/controllers/admin/runners_controller.rb
@@ -3,7 +3,11 @@
class Admin::RunnersController < Admin::ApplicationController
include RunnerSetupScripts
- before_action :runner, except: [:index, :tag_list, :runner_setup_scripts]
+ before_action :runner, except: [:index, :new, :tag_list, :runner_setup_scripts]
+
+ before_action only: [:index] do
+ push_frontend_feature_flag(:create_runner_workflow, current_user)
+ end
feature_category :runner
urgency :low
@@ -18,6 +22,10 @@ class Admin::RunnersController < Admin::ApplicationController
assign_projects
end
+ def new
+ render_404 unless Feature.enabled?(:create_runner_workflow, current_user)
+ end
+
def update
if Ci::Runners::UpdateRunnerService.new(@runner).execute(runner_params).success?
respond_to do |format|
@@ -29,28 +37,6 @@ class Admin::RunnersController < Admin::ApplicationController
end
end
- def destroy
- Ci::Runners::UnregisterRunnerService.new(@runner, current_user).execute
-
- redirect_to admin_runners_path, status: :found
- end
-
- def resume
- if Ci::Runners::UpdateRunnerService.new(@runner).execute(active: true).success?
- redirect_to admin_runners_path, notice: _('Runner was successfully updated.')
- else
- redirect_to admin_runners_path, alert: _('Runner was not updated.')
- end
- end
-
- def pause
- if Ci::Runners::UpdateRunnerService.new(@runner).execute(active: false).success?
- redirect_to admin_runners_path, notice: _('Runner was successfully updated.')
- else
- redirect_to admin_runners_path, alert: _('Runner was not updated.')
- end
- end
-
def tag_list
tags = Autocomplete::ActsAsTaggableOn::TagsFinder.new(params: params).execute
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 4f379d8a75b..00b17bf381f 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -7,7 +7,6 @@ class Admin::UsersController < Admin::ApplicationController
before_action :user, except: [:index, :new, :create]
before_action :check_impersonation_availability, only: :impersonate
before_action :ensure_destroy_prerequisites_met, only: [:destroy]
- before_action :check_ban_user_feature_flag, only: [:ban]
feature_category :user_management
@@ -359,6 +358,7 @@ class Admin::UsersController < Admin::ApplicationController
:skype,
:theme_id,
:twitter,
+ :discord,
:username,
:website_url,
:note,
@@ -377,10 +377,6 @@ class Admin::UsersController < Admin::ApplicationController
access_denied! unless Gitlab.config.gitlab.impersonation_enabled
end
- def check_ban_user_feature_flag
- access_denied! unless Feature.enabled?(:ban_user_feature_flag)
- end
-
def log_impersonation_event
Gitlab::AppLogger.info(format(_("User %{current_user_username} has started impersonating %{username}"), current_user_username: current_user.username, username: user.username))
end