You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allow if {
# path is bound but never referencedwalk(users, [path, value])
value.type =="user"
value.is_admin ==true
}
Prefer
allow if {
# wildcard used for pathwalk(users, [_, value])
value.type =="user"
value.is_admin ==true
}
The latter is optimized in the evaluation, as the path does not need to be constructed in each iteration. This saves a ton of allocations when traversing large nodes.
The text was updated successfully, but these errors were encountered:
Avoid
Prefer
The latter is optimized in the evaluation, as the path does not need to be constructed in each iteration. This saves a ton of allocations when traversing large nodes.
The text was updated successfully, but these errors were encountered: