final class UploadRiskPolicy (View source)

Makes the central authorization decision for a classified format and an upload storage visibility.

Public storage never accepts browser-active, executable, or unclassified formats. Private storage accepts every non-passive category only when the profile explicitly lists that category.

Methods

bool
allows(MimeRisk $risk, UploadVisibility $visibility, array $allowedRisks = [])

Reports whether the risk category is authorized by the visibility and explicit private-storage policy.

bool

Details

allows

bool allows(MimeRisk $risk, UploadVisibility $visibility, array $allowedRisks = [])

Reports whether the risk category is authorized by the visibility and explicit private-storage policy.

Parameters

MimeRisk $risk
UploadVisibility $visibility
array $allowedRisks

Explicit non-passive categories authorized for private storage

Return Value

bool