The action API distinguishes between anonymous and registered users in a number of ways. We need to decide how to update these, given that temporary users will be considered a separate user type compared to anonymous and registered users (see also the discussion in T337103: Decide a standard approach for classifying temporary, IP and registered users).
- Some modules flag or filter by anon users. Should there be a separate flag/filter for temporary users? Should we use user experience flags/filters instead? Examples:
- ApiQueryUserInfo returns anon flag - T358683
- ApiQueryWatchlist returns anon flag - T358693
- ApiQueryContributors returns anons count
- ApiFeedRecentChanges accepts hideanons param - T358249
- T351636: APIs that return anon flag:
- ApiQueryImageInfo
- ApiQueryLogEvents
- ApiQueryRecentChanges
- anything that extends ApiQueryRevisionsBase
- IP address blocks can be made against anonymous users only. How to update this will be worked out in T338836: How should blocks treat temporary users?.
- ApiBlockInfoTrait returns blockanononly flag
- ApiQueryBlocks and ApiBlock accept anononly param
These flags were documented as part of T343714: Soft blocks against an IP address should block temporary accounts using that IP address. We're unlikely to rename them, since it would be a large breaking change. If we were to rename them, it would be beyond the scope of this task.
- T351632: ApiMain accepts assert param to define allowed callers (anon, user, or bot)
- All action APIs can die with error code notloggedin. We could add an error code for temporary users who must register.
Will be covered in T339874: Show more helpful messages when temporary users can't access features, so no more to do in this task.
- T350701: Action and REST APIs can specify allowed user types for a parameter, via UserDef::PARAM_ALLOWED_USER_TYPES. We should add a temp user type to this list:
UserDef::PARAM_ALLOWED_USER_TYPES 'name': User names are allowed. 'ip': IP ("anon") usernames are allowed. 'cidr': IP ranges are allowed. 'interwiki': Interwiki usernames are allowed. 'id': Allow specifying user IDs, formatted like "#123".