HomePhabricator

Allow "user.edit" to enable or disable users

Description

Allow "user.edit" to enable or disable users

Summary:
Depends on D19577. Ref T13164. See PHI642. This adds modern transaction-oriented enable/disable support.

Currently, this also doesn't let you disable normal users even when you're an administrator. I'll refine the policy model later in this change series, since that's also the goal here (let users set "Can Disable Users" to some more broad set of users than "Administrators").

This also leaves us with two different edit pathways: the old UserEditor one and the new UserTransactionEditor one. The next couple diffs will redefine the other pathways in terms of this pathway.

Test Plan:

  • Enabled/disabled a bot.
  • Tried to disable another non-bot user. This isn't allowed yet, since even as an administrator you don't have CAN_EDIT on them and currently need it: right now, there's no way for a particular set of transactions to say they can move forward with reduced permissions.
  • Tried to enable/disable myself. This isn't allowed since you can't enable/disable yourself.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13164

Differential Revision: https://secure.phabricator.com/D19579

Details

Provenance
epriestleyAuthored on Aug 13 2018, 10:32 PM
epriestleyPushed on Aug 16 2018, 5:49 PM
Reviewer
amckinley
Differential Revision
D19579: Allow "user.edit" to enable or disable users
Parents
rP65904d7c5137: Add a modern "user.edit" API method for users
Branches
Unknown
Tags
Unknown
Tasks
T13164: Plans: 2018 Week 31 - 33 Bonus Content
Build Status
Buildable 20633
Build 28040: Run Core Tests