Commit be84e5fb authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '331144-remove-ssh_key_expiration_email_notification-ff' into 'master'

Remove ssh_key_expiration_email_notification Feature Flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!63877
parents 67529808 35bc6dd8
...@@ -15,8 +15,6 @@ module SshKeys ...@@ -15,8 +15,6 @@ module SshKeys
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def perform def perform
return unless ::Feature.enabled?(:ssh_key_expiration_email_notification, default_enabled: :yaml)
order = Gitlab::Pagination::Keyset::Order.build([ order = Gitlab::Pagination::Keyset::Order.build([
Gitlab::Pagination::Keyset::ColumnOrderDefinition.new( Gitlab::Pagination::Keyset::ColumnOrderDefinition.new(
attribute_name: 'expires_at_utc', attribute_name: 'expires_at_utc',
......
...@@ -12,8 +12,6 @@ module SshKeys ...@@ -12,8 +12,6 @@ module SshKeys
idempotent! idempotent!
def perform def perform
return unless ::Feature.enabled?(:ssh_key_expiration_email_notification, default_enabled: :yaml)
# rubocop:disable CodeReuse/ActiveRecord # rubocop:disable CodeReuse/ActiveRecord
User.with_ssh_key_expiring_soon.find_each(batch_size: 10_000) do |user| User.with_ssh_key_expiring_soon.find_each(batch_size: 10_000) do |user|
with_context(user: user) do with_context(user: user) do
......
---
name: ssh_key_expiration_email_notification
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56888
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326386
milestone: '13.11'
type: development
group: group::compliance
default_enabled: true
...@@ -176,6 +176,7 @@ Users are notified of the following events: ...@@ -176,6 +176,7 @@ Users are notified of the following events:
| Event | Sent to | Settings level | | Event | Sent to | Settings level |
|------------------------------|---------------------|------------------------------| |------------------------------|---------------------|------------------------------|
| New SSH key added | User | Security email, always sent. | | New SSH key added | User | Security email, always sent. |
| SSH key has expired | User | Security email, always sent. |
| New email added | User | Security email, always sent. | | New email added | User | Security email, always sent. |
| Email changed | User | Security email, always sent. | | Email changed | User | Security email, always sent. |
| Password changed | User | Security email, always sent when user changes their own password | | Password changed | User | Security email, always sent when user changes their own password |
......
...@@ -49,16 +49,6 @@ RSpec.describe SshKeys::ExpiredNotificationWorker, type: :worker do ...@@ -49,16 +49,6 @@ RSpec.describe SshKeys::ExpiredNotificationWorker, type: :worker do
perform_multiple(worker: worker) perform_multiple(worker: worker)
end end
end end
context 'when feature is not enabled' do
before do
stub_feature_flags(ssh_key_expiration_email_notification: false)
end
it 'does not update notified column' do
expect { worker.perform }.not_to change { expired_today.reload.expiry_notification_delivered_at }
end
end
end end
context 'when key has expired in the past' do context 'when key has expired in the past' do
......
...@@ -35,16 +35,6 @@ RSpec.describe SshKeys::ExpiringSoonNotificationWorker, type: :worker do ...@@ -35,16 +35,6 @@ RSpec.describe SshKeys::ExpiringSoonNotificationWorker, type: :worker do
perform_multiple(worker: worker) perform_multiple(worker: worker)
end end
end end
context 'when feature is not enabled' do
before do
stub_feature_flags(ssh_key_expiration_email_notification: false)
end
it 'does not update notified column' do
expect { worker.perform }.not_to change { expiring_soon.reload.before_expiry_notification_delivered_at }
end
end
end end
context 'when key has expired in the past' do context 'when key has expired in the past' 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