Commit 40c0da17 authored by Igor Drozdov's avatar Igor Drozdov

Merge branch 'remove_inactive_policy_condition_ff' into 'master'

Remove inactive_policy_condition feature flag

See merge request gitlab-org/gitlab!43311
parents c3a1afa6 7816716c
...@@ -27,10 +27,7 @@ class BasePolicy < DeclarativePolicy::Base ...@@ -27,10 +27,7 @@ class BasePolicy < DeclarativePolicy::Base
desc "User email is unconfirmed or user account is locked" desc "User email is unconfirmed or user account is locked"
with_options scope: :user, score: 0 with_options scope: :user, score: 0
condition(:inactive) do condition(:inactive) { @user&.confirmation_required_on_sign_in? || @user&.access_locked? }
Feature.enabled?(:inactive_policy_condition, default_enabled: true) &&
@user&.confirmation_required_on_sign_in? || @user&.access_locked?
end
with_options scope: :user, score: 0 with_options scope: :user, score: 0
condition(:external_user) { @user.nil? || @user.external? } condition(:external_user) { @user.nil? || @user.external? }
......
---
name: inactive_policy_condition
introduced_by_url:
rollout_issue_url:
group:
type: development
default_enabled: true
...@@ -229,12 +229,6 @@ RSpec.describe GlobalPolicy do ...@@ -229,12 +229,6 @@ RSpec.describe GlobalPolicy do
it { is_expected.not_to be_allowed(:access_api) } it { is_expected.not_to be_allowed(:access_api) }
end end
it 'when `inactive_policy_condition` feature flag is turned off' do
stub_feature_flags(inactive_policy_condition: false)
is_expected.to be_allowed(:access_api)
end
end end
end end
...@@ -321,12 +315,6 @@ RSpec.describe GlobalPolicy do ...@@ -321,12 +315,6 @@ RSpec.describe GlobalPolicy do
end end
it { is_expected.not_to be_allowed(:access_git) } it { is_expected.not_to be_allowed(:access_git) }
it 'when `inactive_policy_condition` feature flag is turned off' do
stub_feature_flags(inactive_policy_condition: false)
is_expected.to be_allowed(:access_git)
end
end end
context 'when terms are enforced' do context 'when terms are enforced' do
...@@ -403,12 +391,6 @@ RSpec.describe GlobalPolicy do ...@@ -403,12 +391,6 @@ RSpec.describe GlobalPolicy do
end end
it { is_expected.not_to be_allowed(:use_slash_commands) } it { is_expected.not_to be_allowed(:use_slash_commands) }
it 'when `inactive_policy_condition` feature flag is turned off' do
stub_feature_flags(inactive_policy_condition: false)
is_expected.to be_allowed(:use_slash_commands)
end
end end
context 'when access locked' do context 'when access locked' do
......
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