Skip to content
Snippets Groups Projects
Commit f82eff19 authored by Ian Anderson's avatar Ian Anderson
Browse files

Send Arkose truth data when auto-banning users

Changelog: added
parent 2e4ea7f1
No related branches found
No related tags found
2 merge requests!164749Enable parallel in test-on-omnibus,!162504Send Arkose truth data when auto-banning users
......@@ -22,7 +22,7 @@ def execute!
private
def send_truth_data
return unless ::Feature.enabled?(:arkose_truth_data_auto_ban, user, type: :gitlab_com_derisk)
return unless ::Gitlab::Saas.feature_available?(:identity_verification)
Arkose::TruthDataService.new(user: user, is_legit: false).execute
end
......
---
name: arkose_truth_data_auto_ban
feature_issue_url: https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/548
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/157082
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/468491
milestone: '17.2'
group: group::anti-abuse
type: gitlab_com_derisk
default_enabled: false
......@@ -8,7 +8,7 @@
let(:service) { described_class.new(user: user, reason: reason) }
shared_examples 'executing the service' do
context 'when the feature is enabled' do
context 'when running in SAAS', :saas do
it 'executes the Arkose truth data service' do
expect_next_instance_of(Arkose::TruthDataService, user: user, is_legit: false) do |instance|
expect(instance).to receive(:execute)
......@@ -18,12 +18,8 @@
end
end
context 'when the feature is not enabled' do
before do
stub_feature_flags(arkose_truth_data_auto_ban: false)
end
it 'does not execute the arkose truth data service' do
context 'when not running in SAAS' do
it 'does not execute the Arkose truth data service' do
expect(Arkose::TruthDataService).not_to receive(:new)
subject
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment