Org Web Adapter

pages/mmpy_252_allow_compliance_holds_to_be_created_via_api.org

ID
561cb3f2-1c77-4f04-82bc-7add24d052c1

MMPY-252 Allow compliance holds to be created via API

- source :: https://multimediallc.atlassian.net/browse/MMPY-252

- epic :: MMPY-198 Compliance Holds, Fraud Holds, and Banned Payees

- tags :: Falcon Nest Project Story Falcon Nest Project

- status :: Status - Complete

Description

In order to support an integration between payouts and the compliance tool, allow holds to be created via API.

Requirement

DONE Add compliance holds to be created via API

mmpy252holdsmultimediallcapifalconnestfeaturework
ID
41ad3dcf-e3d1-ef33-9957-bcad0d0a603f

DONE Add tests for compliance holds to be created via API

mmpy252testsholdsmultimediallcapifalconnestfeaturework
ID
5232232c-a955-7798-1574-a406e2199fe8

DONE Make sure we use existing hold check flow

mmpy252holdsmultimediallcapifalconnestfeaturework
ID
57a2c639-8219-71a3-0504-56f85bf4b9e4

DONE Clean up issues from PR review

mmpy252holdsmultimediallcprreviewapifalconnestfeaturework
ID
811e9be8-a954-2e36-263e-6b8039ad9937

- Note taken on

Just cleaning up tests now. I figured out a cludgy way to get a user from the

API calls using a "calling_user" parameter. It works, but it's not great.

There's no security, as anyone could overwrite the sending parameters. But

that's also not our chief concern. Mostly it's just for auditing purposes.

DONE Swap out PATCH on user with a proper Hold viewset

mmpy252holdsfeaturemultimediallcapifalconnestworkproject
ID
7d73adbd-e4b2-db8c-f907-4ec612612956

GIVEN

An admin scoped API request

WHEN

A compliance hold is PATCH is submitted for a specific user ID

THEN

Allow the hold to be closed, no other editing is allowed

Fields:

- ID of the hold

- Notes [OPTIONAL]

- Removed by - username not fk? if we use a django admin user for the created by via api, this field is not included.