Page MenuHomePhabricator

Allow UsersMultiselectWidget to show valid IP addresses and ranges in the autocomplete menu
Closed, ResolvedPublic

Description

If the input contains a valid IP address or range, show it in the autocomplete menu so that it can be selected.

After this, the widget should:

  • Show no menu if the current input is not a valid IP address/range and doesn't complete to a username (as before)
  • Show an autocomplete menu containing one or more usernames if the current input completes to any existing usernames (as before)
  • Show an autocomplete menu containing the current input, if the input is a valid IP address or range
  • When a menu option is selected, add a tag for it (as before)
  • Add a tag for the current user input, even if it is not present in the menu (as before, until T238318 is solved)

Event Timeline

Change 550827 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/core@master] Add option for showing valid IPs in users multiselect widget menu

https://gerrit.wikimedia.org/r/550827

Change 550827 merged by jenkins-bot:
[mediawiki/core@master] Add option for showing valid IPs in UsersMultiselectWidget menu

https://gerrit.wikimedia.org/r/550827

dom_walden subscribed.

After this, the widget should:

  • Show no menu if the current input is not a valid IP address/range and doesn't complete to a username (as before)

Yes.

  • Show an autocomplete menu containing one or more usernames if the current input completes to any existing usernames (as before)

Yes.

  • Show an autocomplete menu containing the current input, if the input is a valid IP address or range

No drop down menu appears for IP addresses. It adds a tag for the IP address/range the user has entered, regardless of whether it is a valid IP address (e.g. "192.168.1.300"). See below also.

  • When a menu option is selected, add a tag for it (as before)

Yes.

  • Add a tag for the current user input, even if it is not present in the menu (as before, until T238318 is solved)

A tag is added to any input the user enters.

In T238240#5696389, I briefly retested the "Prohibit these users from emailing me" input in Special:Preferences, which uses this widget, in case of regressions. I saw no problems.

  • Show an autocomplete menu containing the current input, if the input is a valid IP address or range

No drop down menu appears for IP addresses. It adds a tag for the IP address/range the user has entered, regardless of whether it is a valid IP address (e.g. "192.168.1.300"). See below also.

@dom_walden The menu should appear for valid IP addresses and ranges, but requires the configs ipallowed (for IP addresses) and iprange (for IP ranges) to be set to true. It shouldn't appear for invalid IP addresses and ranges.

@dom_walden Just moved this back to QA since it wasn't closed. It seems the outstanding issues were:

No drop down menu appears for IP addresses.

This depends on config (see T238277#5705031). In Special:Investigate on testwiki, the menu should appear for:

  • Any valid IP address
  • Any valid IPv4 range ending /16 or higher
  • Any valid IPv6 range ending /32 or higher

It adds a tag for the IP address/range the user has entered, regardless of whether it is a valid IP address (e.g. "192.168.1.300").

This is behaving as expected, until T238318.

This depends on config (see T238277#5705031). In Special:Investigate on testwiki, the menu should appear for:

  • Any valid IP address
  • Any valid IPv4 range ending /16 or higher
  • Any valid IPv6 range ending /32 or higher

Thanks. This appears to be true now on thegoodplace wiki.