Page MenuHomePhabricator

Deprecate "user.enable" and "user.disable" API methods, redefine them in terms of "user.edit"
ClosedPublic

Authored by epriestley on Aug 27 2018, 1:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 9, 4:08 PM
Unknown Object (File)
Feb 10 2024, 3:51 AM
Unknown Object (File)
Feb 8 2024, 1:16 PM
Unknown Object (File)
Feb 3 2024, 7:16 PM
Unknown Object (File)
Feb 3 2024, 6:29 PM
Unknown Object (File)
Jan 7 2024, 9:02 PM
Unknown Object (File)
Nov 30 2023, 12:32 AM
Unknown Object (File)
Nov 15 2023, 7:53 AM
Subscribers
None

Details

Summary

Depends on D19604. Ref T13189. See PHI642. Deprecates these in favor of "user.edit", redefines them in terms of it, and removes the old disableUser() method.

I kept the "is admin" permissions check for consistency, since these methods have always said "(admin only)". This check may not be the most tailored check soon, but we can just keep executing it in addition to the real check.

For now, this change stops this method from actually disabling non-bot users (since it implicitly adds a CAN_EDIT requirement, and even administrators don't have that). An upcoming change will fix that.

Test Plan

Enabled and disabled a (bot) user via these methods. Checked API UI, saw them marked as "disabled".

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable