Commit 3910b0bc authored by Thong Kuah's avatar Thong Kuah

Merge branch '330667-feature-flag-rollout-of-ban_user_feature_flag' into 'master'

Default enable the `ban_user_feature_flag` feature flag

See merge request gitlab-org/gitlab!79783
parents 6d746142 aee60e7d
...@@ -370,7 +370,7 @@ class Admin::UsersController < Admin::ApplicationController ...@@ -370,7 +370,7 @@ class Admin::UsersController < Admin::ApplicationController
end end
def check_ban_user_feature_flag def check_ban_user_feature_flag
access_denied! unless Feature.enabled?(:ban_user_feature_flag) access_denied! unless Feature.enabled?(:ban_user_feature_flag, default_enabled: :yaml)
end end
def log_impersonation_event def log_impersonation_event
......
...@@ -169,7 +169,7 @@ module Types ...@@ -169,7 +169,7 @@ module Types
end end
def hidden? def hidden?
object.hidden? if Feature.enabled?(:ban_user_feature_flag) object.hidden? if Feature.enabled?(:ban_user_feature_flag, default_enabled: :yaml)
end end
def escalation_status def escalation_status
......
...@@ -63,7 +63,7 @@ module IssuesHelper ...@@ -63,7 +63,7 @@ module IssuesHelper
end end
def issue_hidden?(issue) def issue_hidden?(issue)
Feature.enabled?(:ban_user_feature_flag) && issue.hidden? Feature.enabled?(:ban_user_feature_flag, default_enabled: :yaml) && issue.hidden?
end end
def hidden_issue_icon(issue) def hidden_issue_icon(issue)
......
...@@ -125,7 +125,7 @@ module UsersHelper ...@@ -125,7 +125,7 @@ module UsersHelper
end end
def ban_feature_available? def ban_feature_available?
Feature.enabled?(:ban_user_feature_flag) Feature.enabled?(:ban_user_feature_flag, default_enabled: :yaml)
end end
def confirm_user_data(user) def confirm_user_data(user)
......
...@@ -143,7 +143,7 @@ class Issue < ApplicationRecord ...@@ -143,7 +143,7 @@ class Issue < ApplicationRecord
scope :confidential_only, -> { where(confidential: true) } scope :confidential_only, -> { where(confidential: true) }
scope :without_hidden, -> { scope :without_hidden, -> {
if Feature.enabled?(:ban_user_feature_flag) if Feature.enabled?(:ban_user_feature_flag, default_enabled: :yaml)
where('NOT EXISTS (?)', Users::BannedUser.select(1).where('issues.author_id = banned_users.user_id')) where('NOT EXISTS (?)', Users::BannedUser.select(1).where('issues.author_id = banned_users.user_id'))
else else
all all
......
...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/330667 ...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/330667
milestone: '13.12' milestone: '13.12'
type: development type: development
group: group::access group: group::access
default_enabled: false default_enabled: true
...@@ -208,7 +208,13 @@ Users can also be activated using the [GitLab API](../../api/users.md#activate-u ...@@ -208,7 +208,13 @@ Users can also be activated using the [GitLab API](../../api/users.md#activate-u
## Ban and unban users ## Ban and unban users
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/327353) in GitLab 14.2. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/327353) in GitLab 14.2 [with a flag](../../administration/feature_flags.md) named `ban_user_feature_flag`. Disabled by default.
> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/330667) in GitLab 14.8.
FLAG:
On self-managed GitLab, by default this feature is available.
To hide the feature, ask an administrator to [disable the feature flag](../../administration/feature_flags.md) named `ban_user_feature_flag`.
On GitLab.com, this feature is available to GitLab.com administrators only.
GitLab administrators can ban and unban users. Banned users are blocked, and their issues are hidden. GitLab administrators can ban and unban users. Banned users are blocked, and their issues are hidden.
The banned user's comments are still displayed. Hiding a banned user's comments is [tracked in this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/327356). The banned user's comments are still displayed. Hiding a banned user's comments is [tracked in this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/327356).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment