Function decide
pub fn decide<'g>(
grants: impl IntoIterator<Item = &'g Grant>,
subjects: &[Subject],
node: &TreePath,
kind: ActionKind,
cx: &Context<'_>,
) -> Decision<'g>Expand description
Decides for one set of subjects over one set of grants:
- Take the live grants whose subject is one of
subjects, whose node isnodeor an ancestor of it, and whose kinds includekind. - The most specific node wins.
- At the same node, Deny beats Ask beats Allow.
- No grant: Deny.