Skip to content

class Athena::Security::Authorization::Strategy::Affirmative
inherits Reference #

Grants the access as soon as a voter grants it.

If all voters abstained, the decision is allow_if_all_abstain_decisions.

Included modules

Athena::Security::Authorization::Strategy::Interface

Constructors#

.new(allow_if_all_abstain_decisions : Bool = false)#

View source

Methods#

#decide(results : Iterator(ASEC::Authorization::Voter::Access), access_decision : ASEC::Authorization::AccessDecision | Nil = nil) : Bool#

Returns true if the access is granted based on the provided results, otherwise false.

The results are lazy: each voter only votes once its result is read, so a strategy can stop reading them as soon as its decision is known.

View source

#to_s(io : IO) : Nil#

Writes the name of this strategy to the provided io.

View source