Show last authorization time for OAuth 2 applications

Fixes #4494
This commit is contained in:
Tom Hughes 2024-01-29 18:50:38 +00:00
parent 24f579562f
commit 95baadaea2
3 changed files with 5 additions and 0 deletions

View file

@ -9,6 +9,9 @@
<% end -%>
</ul>
</td>
<td class="align-middle">
<%= friendly_date_ago(application.authorized_tokens.where(:resource_owner_id => current_user).maximum(:created_at)) %>
</td>
<td class="align-middle text-end">
<%= link_to t(".revoke"), oauth_authorized_application_path(application), { :method => :delete, :class => "btn btn-outline-danger", :data => { :confirm => t(".confirm_revoke") } } %>
</td>

View file

@ -10,6 +10,7 @@
<tr>
<th><%= t ".application" %></th>
<th><%= t ".permissions" %></th>
<th><%= t ".last_authorized" %></th>
<th></th>
</tr>
</thead>

View file

@ -2684,6 +2684,7 @@ en:
title: "My Authorized Applications"
application: "Application"
permissions: "Permissions"
last_authorized: "Last Authorized"
no_applications_html: "You have not yet authorized any %{oauth2} applications."
oauth_2: "OAuth 2"
application: