File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ class AuthenticatedVoter implements VoterInterface
32
32
const IS_ANONYMOUS = 'IS_ANONYMOUS ' ;
33
33
const IS_IMPERSONATOR = 'IS_IMPERSONATOR ' ;
34
34
const IS_REMEMBERED = 'IS_REMEMBERED ' ;
35
+ const PUBLIC_ACCESS = 'PUBLIC_ACCESS ' ;
35
36
36
37
private $ authenticationTrustResolver ;
37
38
@@ -45,6 +46,10 @@ public function __construct(AuthenticationTrustResolverInterface $authentication
45
46
*/
46
47
public function vote (TokenInterface $ token , $ subject , array $ attributes )
47
48
{
49
+ if ($ attributes === [self ::PUBLIC_ACCESS ]) {
50
+ return VoterInterface::ACCESS_GRANTED ;
51
+ }
52
+
48
53
$ result = VoterInterface::ACCESS_ABSTAIN ;
49
54
foreach ($ attributes as $ attribute ) {
50
55
if (null === $ attribute || (self ::IS_AUTHENTICATED_FULLY !== $ attribute
You can’t perform that action at this time.
0 commit comments