Commit 8da90045 authored by Jiaan Louw's avatar Jiaan Louw Committed by Kerri Miller

Refer to expired SSH keys in the past tense

parent c53f5088
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
= s_('Profiles|Last used:') = s_('Profiles|Last used:')
= key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : _('Never') = key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : _('Never')
%span.expires.gl-mr-3 %span.expires.gl-mr-3
= s_('Profiles|Expires:') = key.expired? ? s_('Profiles|Expired:') : s_('Profiles|Expires:')
= key.expires_at ? key.expires_at.to_date : _('Never') = key.expires_at ? key.expires_at.to_date : _('Never')
%span.key-created-at.gl-display-flex.gl-align-items-center %span.key-created-at.gl-display-flex.gl-align-items-center
- if key.can_delete? - if key.can_delete?
......
---
title: Update profile SSH key labels to refer to expired keys as "Expired"
merge_request: 59381
author:
type: changed
...@@ -24152,6 +24152,9 @@ msgstr "" ...@@ -24152,6 +24152,9 @@ msgstr ""
msgid "Profiles|Expired key is not valid." msgid "Profiles|Expired key is not valid."
msgstr "" msgstr ""
msgid "Profiles|Expired:"
msgstr ""
msgid "Profiles|Expires at" msgid "Profiles|Expires at"
msgstr "" msgstr ""
......
...@@ -58,6 +58,20 @@ RSpec.describe 'profiles/keys/_key.html.haml' do ...@@ -58,6 +58,20 @@ RSpec.describe 'profiles/keys/_key.html.haml' do
end end
end end
context 'when the key has expired' do
let_it_be(:key) do
create(:personal_key,
user: user,
expires_at: 2.days.ago)
end
it 'renders "Expired:" as the expiration date label' do
render
expect(rendered).to have_text('Expired:')
end
end
context 'when the key is not deletable' do context 'when the key is not deletable' do
# Turns out key.can_delete? is only false for LDAP keys # Turns out key.can_delete? is only false for LDAP keys
# but LDAP keys don't exist outside EE # but LDAP keys don't exist outside EE
......
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