BonnyPlug.AdmissionReview.Request.deny

You're seeing just the function deny, go back to BonnyPlug.AdmissionReview.Request module for more information.

Specs

Responds by denying the operation

Examples

iex> admission_review = %BonnyPlug.AdmissionReview{request: %{}, response: %{}}
...> BonnyPlug.AdmissionReview.Request.deny(admission_review)
%BonnyPlug.AdmissionReview{request: %{}, response: %{"allowed" => false}}
Link to this function

deny(admission_review, code \\ 400, message)

View Source

Specs

Responds by denying the operation, returning response code and message

Examples

iex> admission_review = %BonnyPlug.AdmissionReview{request: %{}, response: %{}}
...> BonnyPlug.AdmissionReview.Request.deny(admission_review, 403, "foo")
%BonnyPlug.AdmissionReview{request: %{}, response: %{"allowed" => false, "status" => %{"code" => 403, "message" => "foo"}}}

iex> BonnyPlug.AdmissionReview.Request.deny(%BonnyPlug.AdmissionReview{request: %{}, response: %{}}, "foo")
%BonnyPlug.AdmissionReview{request: %{}, response: %{"allowed" => false, "status" => %{"code" => 400, "message" => "foo"}}}