Skip to content

FIX: ensure we can lookup identical ip addresses #32725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/assets/javascripts/admin/addon/components/ip-lookup.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ export default class IpLookup extends Component {
data,
});
this.totalOthersWithSameIP = result.total;
let request = await AdminUser.findAll("active", data);

const users = await AdminUser.findAll("active", data);
this.otherAccounts = users;
this.otherAccounts = request.users;
this.otherAccountsLoading = false;
}
} catch (error) {
Expand Down
11 changes: 11 additions & 0 deletions spec/system/admin_user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@

before { admin_user_page.visit(user) }

it "can list accounts with identical IPs" do
find(".ip-lookup-trigger").click

expect(page).to have_content("#{I18n.t("js.ip_lookup.other_accounts")}\n3")

table = page.find(".other-accounts table")
expect(table).to have_content(similar_user.username)
expect(table).to have_content(another_mod.username)
expect(table).to have_content(another_admin.username)
end

it "displays the suspend and silence buttons" do
expect(admin_user_page).to have_suspend_button
expect(admin_user_page).to have_silence_button
Expand Down
Loading