supportsRole() public method

The voter will get a list of user roles, and can loop through it to check if it supports the roles, eg. based on their prefix. If the voter returns false, we will not ask him to vote, if it returns true, the voter must vote.
public supportsRole ( Role $role ) : boolean
$role Webiny\Component\Security\Role\Role A Role instances that the current route requires.
return boolean
Example #1
0
 public function testSupportsRoleFalse()
 {
     $voter = new RoleVoter();
     $this->assertFalse($voter->supportsRole(new Role("MOCK")));
 }