Background
Currently, a temporary user is created if the first action performed by an anonymous user is edit (more specifically, if the action is performed via EditPage).
However, any other action performed first could cause an anonymous user to be created, stored in the actor table using the IP address as their name. If the action is a logged action, their IP address will still appear in the UI.
An example from core is uploading; an example from an extension is posting to a Flow board.
What should we do
We should specify the other actions in the configuration AutoCreateTempUser['actions'].
However, we also need to implement creating a temp user where these actions are performed. There is a TempUserCreator service which is called from EditPage, but EditPage also does a lot of other work, such as creating unsaved and placeholder temp users for permissions checks etc, for workflow prior to save (e.g. preview).
Questions:
- What other actions should we create a temp user from? (Loggable actions should be flagged by searching for ManualLogEntry.)
- Do the other actions need to do much more than calling TempUserCreator::create? Anything that we should factor out to somewhere common?
- Do we need to re-implement temp user creation for each action, or is there somewhere common we should do this from?
- Can we provide an API for creating temporary users, for JS-only features that need to create a new user?