According to the current version, only a default relationship of either all AND or all OR can be set.
If I want to configure the following verification relationship:
[(verifyUserPassword and verifyLevel) or (verifyVIP)]
it cannot be configured.
This PR is intended to address more complex authorization scenarios in practice, including both AND and OR relationships.
I will treat it as a two-dimensional array where each element represents a verification method, and the second dimension of the array always has an AND relationship.
And it is backwards compatible with defaultRelation OR and AND.
According to the current version, only a default relationship of either all
AND
or allOR
can be set.If I want to configure the following verification relationship: [(verifyUserPassword
and
verifyLevel)or
(verifyVIP)]it cannot be configured.
This PR is intended to address more complex authorization scenarios in practice, including both AND and OR relationships.
I will treat it as a two-dimensional array where each element represents a verification method, and the second dimension of the array always has an
AND
relationship.And it is backwards compatible with defaultRelation OR and AND.
Checklist
npm run test
andnpm run benchmark