Skip to content

Commit

Permalink
Merge pull request #2338 from alphagov/trim-api-users-table
Browse files Browse the repository at this point in the history
Trim API Users table
  • Loading branch information
mike29736 authored Sep 4, 2023
2 parents a99282c + e44f805 commit f28d41a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
1 change: 1 addition & 0 deletions app/views/api_users/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

<p class="suspenders">
User <strong><%= @api_user.status %></strong> &bull;
Created <%= time_ago_in_words(@api_user.created_at) %> ago &bull;
<%= link_to "Account access log", event_logs_user_path(@api_user) %> &bull;
<%= link_to "#{@api_user.suspended? ? "Uns" : "S"}uspend user", edit_suspension_path(@api_user) %>
</p>
Expand Down
20 changes: 0 additions & 20 deletions app/views/api_users/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@
{
text: "Apps",
},
{
text: "Role",
},
{
text: "Sign‑ins",
format: "numeric"
},
{
text: "Created",
},
{
text: "Suspended?",
},
Expand All @@ -47,16 +37,6 @@
{
text: permissions_by_application(user),
},
{
text: user.role.humanize,
},
{
text: user.sign_in_count,
format: "numeric"
},
{
text: "#{time_ago_in_words(user.created_at)} ago",
},
{
text: user.suspended? ? "Yes" : "No",
},
Expand Down
1 change: 0 additions & 1 deletion test/integration/manage_api_users_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class ManageApiUsersTest < ActionDispatch::IntegrationTest
should "be able to view a list of API users alongwith their authorised applications" do
assert page.has_selector?("td", text: @api_user.name)
assert page.has_selector?("td", text: @api_user.email)
assert page.has_selector?("td", text: "Normal")

assert page.has_selector?("abbr", text: @application.name)
assert page.has_selector?("td:last-child", text: "No") # suspended?
Expand Down

0 comments on commit f28d41a

Please sign in to comment.