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)
Wed, Dec 25, 5:16 AM
Unknown Object (File)
Fri, Dec 13, 6:44 AM
Unknown Object (File)
Sun, Dec 8, 7:41 PM
Unknown Object (File)
Fri, Dec 6, 1:17 PM
Unknown Object (File)
Mon, Dec 2, 11:54 PM
Unknown Object (File)
Fri, Nov 29, 1:53 PM
Unknown Object (File)
Thu, Nov 28, 9:24 AM
Unknown Object (File)
Nov 18 2024, 8:45 PM
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
Branch
merchant7
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 23260
Build 31955: Run Core Tests
Build 31954: arc lint + arc unit

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.