Merge pull request #4502 from tomhughes/oauth2-authorization-time

Show last authorization time for OAuth 2 applications
This commit is contained in:
Andy Allan 2024-01-31 14:26:52 +00:00 committed by GitHub
commit 39b0d27bae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 0 deletions

View file

@ -9,6 +9,9 @@
<% end -%> <% end -%>
</ul> </ul>
</td> </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"> <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") } } %> <%= link_to t(".revoke"), oauth_authorized_application_path(application), { :method => :delete, :class => "btn btn-outline-danger", :data => { :confirm => t(".confirm_revoke") } } %>
</td> </td>

View file

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

View file

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