carny v2.2.0 Carny.Statement

Associates a bucket of resources with an "allow" or "deny". On their own not so useful main use is to be composed into Policies.

Link to this section Summary

Link to this section Functions

Link to this function

from_map(statement)

Link to this function

passes?(identifier, statement)

Link to this function

passes?(privilege, identifier, statement)

Checks if an identifier passes a statement.

Examples

iex> Carny.Statement.passes?("start", %Carny.Identifier{}, %Carny.Statement{privileges: ["start"], resources: [%Carny.Identifier{}]})
true