1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-07 13:21:02 +01:00
phorge-phorge/src/applications/phortune
epriestley f686a0b827 In Phortune accounts, prevent self-removal more narrowly
Summary:
Currently, Phortune attempts to prevent users from removing themselves as account managers. It does this by checking that the new list includes them.

Usually this is sufficient, because you can't normally edit an account unless you're already a manager. However, we get the wrong result (incorrect rejection of the edit) if the actor is omnipotent and the acting user was not already a member.

It's okay to edit an account into a state which doesn't include you if you have permission to edit the account and aren't already a manager.

Specifically, this supports more formal tooling around staff modifications to billing accounts, where the actor has staff-omnipotence and the acting user is a staff member and only used for purposes of leaving a useful audit trail.

Test Plan: Elsewhere, ran staff tooling to modify accounts and was able to act as "alice" to add "bailey", even though "alice" was not herself a manager.

Differential Revision: https://secure.phabricator.com/D21288
2020-05-26 07:09:42 -07:00
..
__tests__ Fix member edit transaction validation so it works for both implicit and explicit account creation 2017-04-14 10:24:15 -07:00
action Simplify implementation of "SysetemAction->getSystemActionConstant()" 2019-07-19 15:45:37 -07:00
application Add a test to verify that all routing maps are plausibly valid, and remove some dead routes 2020-02-14 18:06:24 -08:00
capability Add Merchants to Phortune 2014-10-07 10:55:16 -07:00
cart Extend from Phobject 2015-06-15 18:02:27 +10:00
codex Update Phortune subscriptions for modern infrastructure 2019-08-22 21:07:17 -07:00
constants Add scaffolding for ad-hoc email addresses associated with Phortune accounts 2019-08-22 20:57:35 -07:00
contentsource Modularize content sources 2016-03-26 11:59:45 -07:00
control phtize all the things 2015-05-22 21:16:39 +10:00
controller Clean up two straggling UI issues in Phortune 2019-08-31 09:36:23 -07:00
currency phtize all the things 2015-05-22 21:16:39 +10:00
edge In Phortune, write relationships between payment accounts and merchants they interact with 2019-08-22 21:01:04 -07:00
editor In Phortune accounts, prevent self-removal more narrowly 2020-05-26 07:09:42 -07:00
exception Improve UI/UX when users try to add an invalid card with Stripe 2019-02-09 05:54:42 -08:00
mail phtize all the things 2015-05-22 21:16:39 +10:00
management Fix errors found by PHPStan 2017-02-18 09:24:56 +00:00
pdf Add very basic support for generating PDF documents 2019-08-01 10:50:24 -07:00
phid Clean up two straggling UI issues in Phortune 2019-08-31 09:36:23 -07:00
product Add an after-purchase hook to subscriptions in Phortune 2017-07-07 16:39:47 -07:00
provider Update Phortune Merchant UI to bring it in line with Account UI 2019-08-22 21:12:33 -07:00
query In Phortune, send order email to account external addresses 2019-08-26 07:48:27 -07:00
storage Give the Phortune external portal an order view 2019-08-26 07:49:17 -07:00
subscription Add an after-purchase hook to subscriptions in Phortune 2017-07-07 16:39:47 -07:00
view Give the Phortune external portal an order view 2019-08-26 07:49:17 -07:00
worker In Phortune, send order email to account external addresses 2019-08-26 07:48:27 -07:00
xaction Add credential rotation and statuses (disabled, unsubscribed) to Phortune external email 2019-08-26 07:47:44 -07:00