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
{{ message }}
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.
In retrospect, it's clear in the documentation that:
[] = DENY
['*'] = ALLOW
This is intuitive for standard "role" guards since they're "require any" operators. The star says all roles match (and the guest_role means we always have a role). Unfortunately, the syntax is confusing for permissions guards. Since permission are a "require all" guard, it seems intuitive for [] to mean that no permissions are required (e.g. allow).
I realize there's no chance that this will change in the code. My suggestion instead is to change the documentation to create and explicitly use GuardInterface::ALWAYS_ALLOW and GuardInterface::ALWAYS_DENY for these examples.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In retrospect, it's clear in the documentation that:
This is intuitive for standard "role" guards since they're "require any" operators. The star says all roles match (and the
guest_role
means we always have a role). Unfortunately, the syntax is confusing for permissions guards. Since permission are a "require all" guard, it seems intuitive for[]
to mean that no permissions are required (e.g. allow).I realize there's no chance that this will change in the code. My suggestion instead is to change the documentation to create and explicitly use
GuardInterface::ALWAYS_ALLOW
andGuardInterface::ALWAYS_DENY
for these examples.The text was updated successfully, but these errors were encountered: