1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/applications/people/controller
epriestley e46826ad36 Introduce CAN_EDIT for ExternalAccount, and make CAN_VIEW more liberal
Summary:
Fixes T3732. Ref T1205. Ref T3116.

External accounts (like emails used as identities, Facebook accounts, LDAP accounts, etc.) are stored in "ExternalAccount" objects.

Currently, we have a very restrictive `CAN_VIEW` policy for ExternalAccounts, to add an extra layer of protection to make sure users can't use them in unintended ways. For example, it would be bad if a user could link their Phabricator account to a Facebook account without proper authentication. All of the controllers which do sensitive things have checks anyway, but a restrictive CAN_VIEW provided an extra layer of protection. Se T3116 for some discussion.

However, this means that when grey/external users take actions (via email, or via applications like Legalpad) other users can't load the account handles and can't see anything about the actor (they just see "Restricted External Account" or similar).

Balancing these concerns is mostly about not making a huge mess while doing it. This seems like a reasonable approach:

  - Add `CAN_EDIT` on these objects.
  - Make that very restricted, but open up `CAN_VIEW`.
  - Require `CAN_EDIT` any time we're going to do something authentication/identity related.

This is slightly easier to get wrong (forget CAN_EDIT) than other approaches, but pretty simple, and we always have extra checks in place anyway -- this is just a safety net.

I'm not quite sure how we should identify external accounts, so for now we're just rendering "Email User" or similar -- clearly not a bug, but not identifying. We can figure out what to render in the long term elsewhere.

Test Plan:
  - Viewed external accounts.
  - Linked an external account.
  - Refreshed an external account.
  - Edited profile picture.
  - Viewed sessions panel.
  - Published a bunch of stuff to Asana/JIRA.
  - Legalpad signature page now shows external accounts.

{F171595}

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T3732, T1205, T3116

Differential Revision: https://secure.phabricator.com/D9767
2014-07-10 10:18:10 -07:00
..
PhabricatorPeopleApproveController.php Implement most of the administrative UI for approval queues 2013-11-13 11:24:18 -08:00
PhabricatorPeopleCalendarController.php Remove all device = true from page construction 2014-06-23 15:18:14 -07:00
PhabricatorPeopleController.php Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
PhabricatorPeopleCreateController.php Remove all device = true from page construction 2014-06-23 15:18:14 -07:00
PhabricatorPeopleDeleteController.php Implement bin/remove, for structured destruction of objects 2014-05-01 18:23:31 -07:00
PhabricatorPeopleDisableController.php Put Disable/Admin flags on profiles 2014-04-02 12:05:49 -07:00
PhabricatorPeopleEmpowerController.php Make many actions require high security 2014-04-30 17:44:59 -07:00
PhabricatorPeopleLdapController.php Remove all device = true from page construction 2014-06-23 15:18:14 -07:00
PhabricatorPeopleListController.php Move people list rendering into SearchEngine 2014-05-15 19:17:09 -07:00
PhabricatorPeopleLogsController.php Move activity log rendering to a dashboard panel 2014-05-15 19:17:02 -07:00
PhabricatorPeopleNewController.php Remove all device = true from page construction 2014-06-23 15:18:14 -07:00
PhabricatorPeopleProfileController.php Remove all device = true from page construction 2014-06-23 15:18:14 -07:00
PhabricatorPeopleProfileEditController.php Remove all device = true from page construction 2014-06-23 15:18:14 -07:00
PhabricatorPeopleProfilePictureController.php Introduce CAN_EDIT for ExternalAccount, and make CAN_VIEW more liberal 2014-07-10 10:18:10 -07:00
PhabricatorPeopleRenameController.php Make many actions require high security 2014-04-30 17:44:59 -07:00
PhabricatorPeopleWelcomeController.php Move "Send Welcome Email" to profiles and nuke old weird edit UI 2014-04-02 12:06:17 -07:00