-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
MBS-12902: Add pagination to admin email/IP search #2862
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
375f682
to
61796f6
Compare
mwiencek
approved these changes
Mar 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these are admin-facing pages only, I think it's fine to test the IP changes on beta.
In some cases, there's over 100 accounts using a dodgy IP or the same email pattern. In those cases, we want admins to be able to see (and possibly ban) them all.
reosarevok
added a commit
that referenced
this pull request
Mar 13, 2023
* master: Update POT files using the production database Update translations from Transifex MBS-12902: Add pagination to admin email/IP search (#2862) Fix empty response when hitting a temporary IA delay (#2745) MBS-12959: Only hide My vote in header for non-voting editors (#2880) Use diag() rather than comments for email-search cases MBS-12994: Treat email as case-insensitive for admin email search MBS-12984: Link zoomable image in the WikiDocs (#2894) Update 45cat URL in tests after MBS-12721 Drop 45cat/45worlds href override after MBBE-65 Drop LiveFans href override after MBBE-73 Drop OC ReMix href override after MBBE-74 Drop Weibo href override after MBBE-75 Regenerate cpanfile.snapshot files after MBS-12983 Drop Recochoku href override after MBBE-38 MBS-12980 (addendum): Transiently replace protocol MBS-12983: Update to DateTime::Locale 1.37 MBS-12980: Use HTTPS for DNB permalinks MBS-12978: Widen the DNB regex even further Change React.Portal -> React$Portal Change React.AbstractComponent -> React$AbstractComponent Change React.MixedElement -> React$MixedElement Change React.Node -> React$Node Change React.Element -> React$Element Remove inference_mode=lti from .flowconfig Fix incorrect test description Remove some unnecessary uses of 'any' Remove unused $Flow comments Rename $Partial to Partial Upgrade Flow to 0.201.0 Upgrade Flow to 0.200.1 Upgrade Flow to 0.200.0 Upgrade Flow to 0.199.1 Upgrade Flow to 0.199.0 Upgrade Flow to 0.198.2 Upgrade Flow to 0.198.1 Upgrade Flow to 0.198.0 .flowconfig: enable inference_mode=lti Split Entity::AliasType into per-entity classes Add missing type types to linkedEntities Get rid of YAML format warnings Allow for JSX in .mjs files Refactor: Fix Flow type’s name for pending edits Refactor: Fix Data role’s name for pending edits Refactor: Fix Entity role’s name for pending edits Amend d83903c: refine type through Flow comment Rename CollectableCoreEntityT to CollectableEntityT Fine-grain entity types with aliases Fine-grain entity type for artist credit list Enforce collectable entity types where possible Fine-grain entity types with artist credits Allow specifying which resources an extra inc is for Follow Perl::Critic::Policy::Variables::ProhibitPunctuationVars Follow Perl::Critic::Policy::Variables::ProhibitConditionalDeclarations Refactor Server::Controller for clarity Refactor Data::Search for clarity / speed Follow Perl::Critic::Policy::Variables::ProhibitAugmentedAssignmentInDeclaration Follow Perl::Critic::Policy::Variables::ProtectPrivateVars Follow Perl::Critic::Policy::Variables::RequireNegativeIndices MBS-12962: Don't ISE on undef track_offset (#2882) MBS-11565: Use less hopeful image not available message (#2872) Upgrade Flow to 0.197.0 Upgrade Flow to 0.196.3 Upgrade Flow to 0.196.2 Upgrade Flow to 0.196.1 Remove some unused Flow suppressions Upgrade Flow to 0.196.0 Upgrade Flow to 0.195.2 Upgrade Flow to 0.195.1 Upgrade Flow to 0.195.0 .flowconfig: enable unused-promise-in-async-scope lint Upgrade Flow to 0.194.0 Upgrade Flow to 0.193.0 Upgrade Flow to 0.192.0 Upgrade Flow to 0.191.0 MBS-12955: Display beginner flag in vote tally Don't duplicate EditorTypeInfo MBS-12848: Reject inc=various-artists without inc=releases
reosarevok
added a commit
that referenced
this pull request
Mar 20, 2023
* beta: Update translations from Transifex Update POT files using the production database Update translations from Transifex MBS-12990: Don't pad the legend relationship editor fieldset (#2903) MBS-11786: Add a text view of statistics events MBS-11393: Show SetTrackLengths edit in recording edit history (#1969) MBS-12976: Changing a work can cause duplication/key errors batchSelectionCount should be undefined if unused Sync MediumT with Entity::Medium::TO_JSON Fix incorrect EntityRoleT type argument MBS-13001: Actually set source_type and target_type for historic rels (#2900) Load Entity:::*AliasType classes from Data::*AliasType Update POT files using the production database Update translations from Transifex MBS-12902: Add pagination to admin email/IP search (#2862) Fix empty response when hitting a temporary IA delay (#2745) Autocomplete2: Change useLayoutEffect to useEffect Actually submit the collection form in test CollectionEditForm: Use Autocomplete2 for collaborators MBS-12614: Better placement for Add collaborator button MBS-12959: Only hide My vote in header for non-voting editors (#2880) Use diag() rather than comments for email-search cases MBS-12994: Treat email as case-insensitive for admin email search MBS-12984: Link zoomable image in the WikiDocs (#2894) Update 45cat URL in tests after MBS-12721 Drop 45cat/45worlds href override after MBBE-65 Drop LiveFans href override after MBBE-73 Drop OC ReMix href override after MBBE-74 Drop Weibo href override after MBBE-75 Regenerate cpanfile.snapshot files after MBS-12983 Drop Recochoku href override after MBBE-38 MBS-12980 (addendum): Transiently replace protocol MBS-12983: Update to DateTime::Locale 1.37 MBS-12980: Use HTTPS for DNB permalinks MBS-12978: Widen the DNB regex even further Change React.Portal -> React$Portal Change React.AbstractComponent -> React$AbstractComponent Change React.MixedElement -> React$MixedElement Change React.Node -> React$Node Change React.Element -> React$Element Remove inference_mode=lti from .flowconfig Fix incorrect test description Remove some unnecessary uses of 'any' Remove unused $Flow comments Rename $Partial to Partial Upgrade Flow to 0.201.0 Upgrade Flow to 0.200.1 Upgrade Flow to 0.200.0 Upgrade Flow to 0.199.1 Upgrade Flow to 0.199.0 Upgrade Flow to 0.198.2 Upgrade Flow to 0.198.1 Upgrade Flow to 0.198.0 .flowconfig: enable inference_mode=lti Split Entity::AliasType into per-entity classes Add missing type types to linkedEntities Get rid of YAML format warnings Allow for JSX in .mjs files Refactor: Fix Flow type’s name for pending edits Refactor: Fix Data role’s name for pending edits Refactor: Fix Entity role’s name for pending edits Amend d83903c: refine type through Flow comment Rename CollectableCoreEntityT to CollectableEntityT Fine-grain entity types with aliases Fine-grain entity type for artist credit list Enforce collectable entity types where possible Fine-grain entity types with artist credits Allow specifying which resources an extra inc is for Follow Perl::Critic::Policy::Variables::ProhibitPunctuationVars Follow Perl::Critic::Policy::Variables::ProhibitConditionalDeclarations Refactor Server::Controller for clarity Refactor Data::Search for clarity / speed Follow Perl::Critic::Policy::Variables::ProhibitAugmentedAssignmentInDeclaration Follow Perl::Critic::Policy::Variables::ProtectPrivateVars Follow Perl::Critic::Policy::Variables::RequireNegativeIndices MBS-12962: Don't ISE on undef track_offset (#2882) MBS-11565: Use less hopeful image not available message (#2872) Upgrade Flow to 0.197.0 Upgrade Flow to 0.196.3 Upgrade Flow to 0.196.2 Upgrade Flow to 0.196.1 Remove some unused Flow suppressions Upgrade Flow to 0.196.0 Upgrade Flow to 0.195.2 Upgrade Flow to 0.195.1 Upgrade Flow to 0.195.0 .flowconfig: enable unused-promise-in-async-scope lint Upgrade Flow to 0.194.0 Upgrade Flow to 0.193.0 Upgrade Flow to 0.192.0 Upgrade Flow to 0.191.0 MBS-12955: Display beginner flag in vote tally Don't duplicate EditorTypeInfo MBS-12848: Reject inc=various-artists without inc=releases Move statistics event types to the types folder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement MBS-12902
Problem
In some cases, there's over 100 accounts using a dodgy IP or the same email pattern. In those cases, we want admins to be able to see (and possibly ban) them all, but the searches are currently limited to 100 results.
Solution
This adds pagination to both email and IP lookup. The IP pagination is fairly trivial. The email one is more complicated, since the email address is posted when submitting the form. We need to store it somewhere (I put it in
$c->session
at the suggestion of @mwiencek) and use it when navigating through the pages, since otherwise the results will be lost as soon as we navigate to page 2.Testing
Email search tested manually with a specific user email (one result shows correctly, no pagination UI is shown) and with a wider search (
mailbox\.org
) with 10 pages of results (pagination works fine and the form contains the searched regex at all times).IP lookup not tested because I don't have any IP data locally AFAICT.