summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-02-07 00:10:31 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-07 00:10:31 +0000
commit11438b1771abda3c216ca627bf5319684474889b (patch)
treea109ca98c2c8836152358b8699324e4261ecf6b2 /app
parent09fd08f7e5db4514ce82223ab9a28ed8f823fb17 (diff)
downloadgitlab-ce-11438b1771abda3c216ca627bf5319684474889b.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/integrations/constants.js14
-rw-r--r--app/controllers/admin/users_controller.rb5
-rw-r--r--app/controllers/whats_new_controller.rb2
-rw-r--r--app/graphql/types/issue_type.rb14
-rw-r--r--app/helpers/admin/user_actions_helper.rb1
-rw-r--r--app/helpers/issues_helper.rb2
-rw-r--r--app/helpers/users_helper.rb4
-rw-r--r--app/models/issue.rb6
-rw-r--r--app/views/admin/users/_users.html.haml7
9 files changed, 18 insertions, 37 deletions
diff --git a/app/assets/javascripts/integrations/constants.js b/app/assets/javascripts/integrations/constants.js
index bd7c38e96fe..5d08520bb5c 100644
--- a/app/assets/javascripts/integrations/constants.js
+++ b/app/assets/javascripts/integrations/constants.js
@@ -58,19 +58,21 @@ export const integrationTriggerEvents = {
export const integrationTriggerEventTitles = {
[integrationTriggerEvents.PUSH]: s__('IntegrationEvents|A push is made to the repository'),
[integrationTriggerEvents.ISSUE]: s__(
- 'IntegrationEvents|An issue is created, updated, or closed',
+ 'IntegrationEvents|An issue is created, closed, or reopened',
),
[integrationTriggerEvents.CONFIDENTIAL_ISSUE]: s__(
- 'IntegrationEvents|A confidential issue is created, updated, or closed',
+ 'IntegrationEvents|A confidential issue is created, closed, or reopened',
),
[integrationTriggerEvents.MERGE_REQUEST]: s__(
- 'IntegrationEvents|A merge request is created, updated, or merged',
+ 'IntegrationEvents|A merge request is created, merged, closed, or reopened',
),
- [integrationTriggerEvents.NOTE]: s__('IntegrationEvents|A comment is added on an issue'),
+ [integrationTriggerEvents.NOTE]: s__('IntegrationEvents|A comment is added'),
[integrationTriggerEvents.CONFIDENTIAL_NOTE]: s__(
- 'IntegrationEvents|A comment is added on a confidential issue',
+ 'IntegrationEvents|An internal note or comment on a confidential issue is added',
+ ),
+ [integrationTriggerEvents.TAG_PUSH]: s__(
+ 'IntegrationEvents|A tag is pushed to the repository or removed',
),
- [integrationTriggerEvents.TAG_PUSH]: s__('IntegrationEvents|A tag is pushed to the repository'),
[integrationTriggerEvents.PIPELINE]: s__('IntegrationEvents|A pipeline status changes'),
[integrationTriggerEvents.WIKI_PAGE]: s__('IntegrationEvents|A wiki page is created or updated'),
[integrationTriggerEvents.DEPLOYMENT]: s__(
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 23ec80c1fa9..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
@@ -378,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
diff --git a/app/controllers/whats_new_controller.rb b/app/controllers/whats_new_controller.rb
index 4decd7f1bee..03b9c49de96 100644
--- a/app/controllers/whats_new_controller.rb
+++ b/app/controllers/whats_new_controller.rb
@@ -8,7 +8,7 @@ class WhatsNewController < ApplicationController
before_action :check_whats_new_enabled
before_action :check_valid_page_param, :set_pagination_headers
- feature_category :navigation
+ feature_category :onboarding
urgency :low
def index
diff --git a/app/graphql/types/issue_type.rb b/app/graphql/types/issue_type.rb
index 4948063610a..fa102c7b496 100644
--- a/app/graphql/types/issue_type.rb
+++ b/app/graphql/types/issue_type.rb
@@ -54,16 +54,14 @@ module Types
description: 'Indicates the issue is confidential.'
field :discussion_locked, GraphQL::Types::Boolean, null: false,
description: 'Indicates discussion is locked on the issue.'
- field :due_date, Types::TimeType, null: true,
- description: 'Due date of the issue.'
- field :hidden, GraphQL::Types::Boolean, null: true, resolver_method: :hidden?,
- description: 'Indicates the issue is hidden because the author has been banned. ' \
- 'Will always return `null` if `ban_user_feature_flag` feature flag is disabled.'
-
field :downvotes, GraphQL::Types::Int,
null: false,
description: 'Number of downvotes the issue has received.',
resolver: Resolvers::DownVotesCountResolver
+ field :due_date, Types::TimeType, null: true,
+ description: 'Due date of the issue.'
+ field :hidden, GraphQL::Types::Boolean, null: true,
+ description: 'Indicates the issue is hidden because the author has been banned.', method: :hidden?
field :merge_requests_count, GraphQL::Types::Int, null: false,
description: 'Number of merge requests that close the issue on merge.',
resolver: Resolvers::MergeRequestsCountResolver
@@ -190,10 +188,6 @@ module Types
object.creatable_note_email_address(context[:current_user])
end
- def hidden?
- object.hidden? if Feature.enabled?(:ban_user_feature_flag)
- end
-
def escalation_status
object.supports_escalation? ? object.escalation_status&.status_name : nil
end
diff --git a/app/helpers/admin/user_actions_helper.rb b/app/helpers/admin/user_actions_helper.rb
index dc31c06477e..969c5d5a0b5 100644
--- a/app/helpers/admin/user_actions_helper.rb
+++ b/app/helpers/admin/user_actions_helper.rb
@@ -55,7 +55,6 @@ module Admin
end
def ban_actions
- return unless ban_feature_available?
return if @user.internal?
if @user.banned?
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 114bcda127f..39399c2919b 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -57,7 +57,7 @@ module IssuesHelper
end
def issue_hidden?(issue)
- Feature.enabled?(:ban_user_feature_flag) && issue.hidden?
+ issue.hidden?
end
def hidden_issue_icon(issue)
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index 601ae4f9264..6fa3fc4f04a 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -120,10 +120,6 @@ module UsersHelper
!user.confirmed?
end
- def ban_feature_available?
- Feature.enabled?(:ban_user_feature_flag)
- end
-
def confirm_user_data(user)
message = if user.unconfirmed_email.present?
_('This user has an unconfirmed email address (%{email}). You may force a confirmation.') % { email: user.unconfirmed_email }
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 8b4477d4fcb..b39e37f611b 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -181,11 +181,7 @@ class Issue < ApplicationRecord
scope :confidential_only, -> { where(confidential: true) }
scope :without_hidden, -> {
- if Feature.enabled?(:ban_user_feature_flag)
- where('NOT EXISTS (?)', Users::BannedUser.select(1).where('issues.author_id = banned_users.user_id'))
- else
- all
- end
+ where.not(author_id: Users::BannedUser.select(:user_id))
}
scope :counts_by_state, -> { reorder(nil).group(:state_id).count }
diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml
index 5c11ba95bff..96dd16a96da 100644
--- a/app/views/admin/users/_users.html.haml
+++ b/app/views/admin/users/_users.html.haml
@@ -32,10 +32,9 @@
= gl_tab_link_to admin_users_path(filter: "blocked"), { item_active: active_when(params[:filter] == 'blocked'), class: 'gl-border-0!' } do
= s_('AdminUsers|Blocked')
= gl_tab_counter_badge(limited_counter_with_delimiter(User.blocked))
- - if ban_feature_available?
- = gl_tab_link_to admin_users_path(filter: "banned"), { item_active: active_when(params[:filter] == 'banned'), class: 'gl-border-0!' } do
- = s_('AdminUsers|Banned')
- = gl_tab_counter_badge(limited_counter_with_delimiter(User.banned))
+ = gl_tab_link_to admin_users_path(filter: "banned"), { item_active: active_when(params[:filter] == 'banned'), class: 'gl-border-0!' } do
+ = s_('AdminUsers|Banned')
+ = gl_tab_counter_badge(limited_counter_with_delimiter(User.banned))
= gl_tab_link_to admin_users_path(filter: "blocked_pending_approval"), { item_active: active_when(params[:filter] == 'blocked_pending_approval'), class: 'filter-blocked-pending-approval gl-border-0!', data: { qa_selector: 'pending_approval_tab' } } do
= s_('AdminUsers|Pending approval')
= gl_tab_counter_badge(limited_counter_with_delimiter(User.blocked_pending_approval))