Commit 7816716c authored by Adam Hegyi's avatar Adam Hegyi

Remove inactive_policy_condition feature flag

parent ff29fcb0
......@@ -27,10 +27,7 @@ class BasePolicy < DeclarativePolicy::Base
desc "User email is unconfirmed or user account is locked"
with_options scope: :user, score: 0
condition(:inactive) do
Feature.enabled?(:inactive_policy_condition, default_enabled: true) &&
@user&.confirmation_required_on_sign_in? || @user&.access_locked?
end
condition(:inactive) { @user&.confirmation_required_on_sign_in? || @user&.access_locked? }
with_options scope: :user, score: 0
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
it { is_expected.not_to be_allowed(:access_api) }
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
......@@ -321,12 +315,6 @@ RSpec.describe GlobalPolicy do
end
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
context 'when terms are enforced' do
......@@ -403,12 +391,6 @@ RSpec.describe GlobalPolicy do
end
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
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