availability->guardDelivery($file); // Separate from the policy on purpose: a spent download limit is // not "you may not see this file" — the file stays listed, and // the same person may still open its details. It is only the // taking of a copy that stops. See DownloadAllowance. abort_unless($this->allowance->allows($file, $request->user()), 403); $this->activity->log(Action::FileDownloaded, subject: $file); return $this->bytes->attachment($file); } }