-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Right now in order to associate a changemaker with a proposal a client needs to create the proposal and THEN create that association. This means multiple calls, that if an association will fail then you might have a proposal without its association / end in only part of the intended state. It also means that a client needs permission to perform both actions, which is complex given that we don't have the ability to grant specific permissions against specific proposals right now.
Given all this, I'd like to suggest we allow clients to specify associated changemakers as part of a POST /proposals
call. We have something like this already for POST /proposalVersions
since we allow clients to provide all of the relevant field values in a proposal.
This is reasonable, as Changemaker associations are many-to-many but arguably they are an attribute of the proposal itself and it makes sense that a user should be able to specify the association as part of the initial creation. This has an added benefit of assisting with our permission structure.
As part of this we might reflect on whether this means that the concept of a ChangemakerProposal
should be removed from the API / updating that relationship should be purely via REST. I'd encourage us to think of that as a separate issue from this, however.