@@ -36,6 +36,19 @@ abstract class AbstractVoter extends Voter
|
||||
$this->decisionManager = $decisionManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TokenInterface $token
|
||||
* @return bool
|
||||
*/
|
||||
protected function isFullyAuthenticated(TokenInterface $token)
|
||||
{
|
||||
if ($this->decisionManager->decide($token, ['IS_AUTHENTICATED_FULLY'])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $role
|
||||
* @param TokenInterface $token
|
||||
@@ -43,7 +56,7 @@ abstract class AbstractVoter extends Voter
|
||||
*/
|
||||
protected function hasRole($role, TokenInterface $token)
|
||||
{
|
||||
if ($this->decisionManager->decide($token, array($role))) {
|
||||
if ($this->decisionManager->decide($token, [$role])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user