Merge pull request #5274 from consuldemocracy/last-sign-in
ENS: Add security secret "last_sign_in"
This commit is contained in:
4
app/components/account/sign_in_info_component.html.erb
Normal file
4
app/components/account/sign_in_info_component.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<div class="callout primary">
|
||||
<%= t("account.show.last_sign_in", last_sign_in_at: I18n.l(account.last_sign_in_at, format: :long),
|
||||
last_sign_in_ip: account.last_sign_in_ip) %>
|
||||
</div>
|
||||
11
app/components/account/sign_in_info_component.rb
Normal file
11
app/components/account/sign_in_info_component.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class Account::SignInInfoComponent < ApplicationComponent
|
||||
attr_reader :account
|
||||
|
||||
def initialize(account)
|
||||
@account = account
|
||||
end
|
||||
|
||||
def render?
|
||||
Tenant.current_secrets.dig(:security, :last_sign_in)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user