Page MenuHomePhabricator

Update PhortunePaymentMethod for modern policy interfaces
ClosedPublic

Authored by epriestley on Aug 16 2019, 5:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 10 2024, 6:15 PM
Unknown Object (File)
Feb 11 2024, 10:56 AM
Unknown Object (File)
Dec 27 2023, 1:15 PM
Unknown Object (File)
Dec 22 2023, 2:41 AM
Unknown Object (File)
Dec 20 2023, 4:36 AM
Unknown Object (File)
Nov 30 2023, 3:17 AM
Unknown Object (File)
Nov 16 2023, 8:08 AM
Unknown Object (File)
Nov 14 2023, 1:06 AM
Subscribers
None

Details

Summary

Depends on D20717. Ref T13366. Make PhortunePaymentMethod use an extended policy interface for consistency with modern approaches. Since Accounts have hard-coded policy behavior (and can't have object policies like "Subscribers") this should have no actual impact on program behavior.

This leaves one weird piece in the policy dialog UIs, see T13381.

Test Plan

Viewed and edited payment methods as a merchant and account member. Merchants can only view, not edit.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This is actually slightly tricky.

Since payment methods are bound to a particular merchant, we only want to let merchants view payment methods associated with their own merchant account.

Tweak the implementation to align around this.

src/applications/policy/codex/PhabricatorPolicyCodex.php
47–55

(I couldn't find any callers for this anywhere.)

This revision was not accepted when it landed; it landed in state Needs Review.Aug 23 2019, 4:03 AM
This revision was automatically updated to reflect the committed changes.