#[non_exhaustive]pub struct Decision {
pub allowed: bool,
pub wanted: Rights,
pub granted: Rights,
pub denied: Rights,
pub deciding: Option<usize>,
pub cancelled: bool,
}Expand description
What a check came to.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.allowed: boolWhether every wanted right is granted.
wanted: RightsThe rights asked for.
granted: RightsThe rights the ACL grants this requester, whether asked for or not.
denied: RightsThe rights an entry refused this requester.
deciding: Option<usize>The entry that decided, for an audit record: the deny that refused, the allow that
completed the grant, or the cancelling entry; None when no entry decided.
cancelled: boolWhether a cancelling name refused everything.
Implementations§
Source§impl Decision
impl Decision
Sourcepub fn intersect(&self, other: &Decision) -> Decision
pub fn intersect(&self, other: &Decision) -> Decision
Both decisions at once, for a token with an ACL of its own or a read-only token
(Proxmox privilege separation, NetBox write_enabled): granted only what both
grant, denied what either denies, allowed only if both allow. deciding is the
first refusing side’s, else this one’s.
Sourcepub fn union_where_unset(&self, other: &Decision) -> Decision
pub fn union_where_unset(&self, other: &Decision) -> Decision
This decision, with other deciding the rights this one left unset (neither
granted nor denied): a second parent such as a Proxmox pool. A cancelled side wins
(this one first).