piazza_core v0.2.5 Piazza.Policy
Simple composable policy, each policy should be of the form:
can?(user, resource, action) -> :continue, {:error, "reason"}, :pass
Policies can then be composed like:
import Core.Policy.SomeModel
...
allow(resource, user, [action]) -> {:ok, resource} | {:error, error}
Link to this section Summary
Link to this section Functions
Link to this function
find_resource(cs)
Link to this function