-
Notifications
You must be signed in to change notification settings - Fork 22
Requests
A request is considered to be payable if its status is payment
and it does not have an active crowdfund.
A user can pay for a request if they can edit the request and if it is payable.
Payments are made to the <request>/pay
endpoint and crowdfunds are created at the <request>/crowdfund
endpoint.
To make a payment, POST
a valid Stripe token, an email, and an amount to the payment endpoint.
To make a crowdfund, a valid CrowdfundRequestForm
must be submitted.
When making a payment, a 5% fee is added to the payment amount.
When creating a crowdfund, a 15% fee is added to the crowdfund goal.
A request may be shared with other MuckRock users. There are three roles for sharing: creator, editor, and viewer. There are two permissions for sharing: read and write. A viewer has permission to read. Creators and editors both have permission to read and write. A creator is distinct from an editor in that a creator may never have their permissions changed, while an editor's permissions may be changed.
Anyone with read permission may view a request under embargo.
Anyone with write access may add an editor or viewer at any time. Anyone with write access may demote an editor to a viewer. Anyone with write access may promote a viewer to an editor. Editors may also revoke their own access, if they choose.
An editor or creator may generate a private URL if the request is under embargo.
This private URL is the regular request URL with an extra key
argument.
As long as the key
in the URL matches the key
saved to the request, anyone (even a logged out user) may view the request despite the embargo.
Each time the private URL is generated, a new key is randomly generated.
An embargo keeps a request private. Embargoes serve the needs of our journalist users, who may want to keep their research private until their story is published (don't scoop our own users!). Staff, pros, betas, proxies, and org members have permission to embargo requests. Staff and organization members may apply a permanent embargo.
Embargo should be allowed if the user can embargo and edit the request. Users without permission to edit the request should not be able to change the embargo. Users without permission to embargo should not be allowed to set one. When an embargo is set, all the followers of a request should be unsubscribed.
The embargo should be able to be updated. If the request is in a closed state, it needs a date to be applied. A request with a permanent embargo should stay embargoed indefinitely.
The default and maximum duration for an embargo is 30 days.
End status where an embargo expiration date are required are rejected
, no_docs
, done
, partial
, and abandoned
.
If the request status is changed to an end status and it is embargoed, set the embargo expiration date to its default duration.
If the request is then changed to a different end status (e.g. from partial
to done
), the existing expiration date should not be changed.
The embargo date should be removed if the request is changed to a non-end status.
The embargo should be removable by editors of the request. Any user should be allowed to remove an embargo, even if they cannot apply one.
Every day at 00:00 (midnight), a task will be run that removes expired embargoes. Any requests with an embargo date before today should be unembargoed. Only after the embargo expiration date passes should the embargo expire. An embargo without an expiration date should not expire.
Dates are calculated when a request sends or receives a communication:
- If
date_submitted
isNone
, this is the first submission:- Set the
date submitted
field totoday
- Set
date_due
to the number ofbusiness days
from now, based on the jurisdiction.
- Set the
- If
status
is eitherawaiting acknowledgment
orawaiting response
, then what?:- If
days_until_due
is set, set it toNone
. Then set thedate_due
to that many business days out. - Set the
followup date
:- The new
followup date
is tentatively (estimated completion date
if there is one,30 days
iffederal
,15 days
otherwise) out. - If there is a
date due
and it is further out in the future than thefollow up date
, then thedate due
is the newfollow up date
. - If there is already a
follow up date
and it is further in the future than this newly calculated date, do not update thefollow up date
.
- The new
- If
- If the
status
is notawaiting acknowledgment
orawaiting response
, remove thefollow up date
anddisable
auto followups. - If the
status
isfix
orpayment
required and there is adue date
:- Remove the
due date
, and count the number ofbusiness days
between thelast response date
and thedue date
. Setdays_until_due
to this number of days
- Remove the