Page MenuHomePhabricator

Make ApiOptions unavailable to temporary users
Open, Needs TriagePublic2 Estimated Story Points

Description

ApiOptions (used for setting preferences) throws a 'notloggedin' error for anonymous users. It should do the same for temporary users.

mw.Api#saveOptions (in JS) calls ApiOptions, and currently skips the API request for logged-out users. It should do the same for temporary users.

Testing Notes

  • As a temporary user, access the API sandbox ,e.g. http://localhost:8080/wiki/Special:ApiSandbox.
  • Select the "options" module in the "action" parameter dropdown. Fill in the required parameters, such as the token and an option that you want to change (e.g., changing the 'language' to 'es') and make the API request.
  • Check the response to ensure that you receive an error or a message indicating that temporary users cannot update user options.
  • Also Test API calls as a registered user and an anonymous user to make sure the response is as expected.

Event Timeline

Tchanders set the point value for this task to 1.

Request from me: please also update mw.Api#saveOptions in JS, which calls ApiOptions, and currently checks for logged-out users to skip the API request.

Tchanders changed the point value for this task from 1 to 2.

Request from me: please also update mw.Api#saveOptions in JS, which calls ApiOptions, and currently checks for logged-out users to skip the API request.

Thanks - task updated

Change 901672 had a related patch set uploaded (by Cyndywikime; author: Cyndywikime):

[mediawiki/core@master] Make ApiOptions unavailable to temporary users

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