1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-28 06:29:27 +01:00
phorge-phorge/src/applications/people/capability
epriestley 058952e72e Add a "Can Disable Users" capability to the "People" application
Summary:
Depends on D19605. Ref T13189. See PHI642. This adds a separate "Can Disable Users" capability, and makes the underlying transaction use it.

This doesn't actually let you weaken the permission, since all pathways need more permissions:

  - `user.edit` needs CAN_EDIT.
  - `user.disable/enable` need admin.
  - Web UI workflow needs admin.

Upcoming changes will update these pathways.

Without additional changes, this does let you //strengthen// the permission.

This also fixes the inability to disable non-bot users via the web UI.

Test Plan:
  - Set permission to "No One", tried to disable users. Got a tailored policy error.
  - Set permission to "All Users", disabled/enabled a non-bot user.

Reviewers: amckinley

Maniphest Tasks: T13189

Differential Revision: https://secure.phabricator.com/D19606
2018-08-27 08:01:27 -07:00
..
PeopleBrowseUserDirectoryCapability.php Simplify the implementation of PhabricatorPolicyCapability subclasses 2014-07-25 08:25:42 +10:00
PeopleCreateUsersCapability.php People - refine permissions on creating new users 2015-02-05 16:47:09 -08:00
PeopleDisableUsersCapability.php Add a "Can Disable Users" capability to the "People" application 2018-08-27 08:01:27 -07:00