Infrastructure/Security/Authorization/AuthorizationService.php
public function isAuthorized(string $resource): bool
    {
        // get permission model object
        if (null === $permission = (PermissionsEntityMapper::getInstance())->getObjectByTitle($resource, true)) {
            throw new Exceptions\QueryResultsNotFoundException("Permission not found for: $resource");
        }

        // authorized if administrator has at least one role assigned to permission 
        return $this->getLoggedInAdministrator()->hasOneRoleByObject($permission->getRoles());
    }
public function isAuthorized(string $resource): bool
    {
        // get permission model object
        if (null === $permission = (PermissionsEntityMapper::getInstance())->getObjectByTitle($resource, true)) {
            throw new Exceptions\QueryResultsNotFoundException("Permission not found for: $resource");
        }

        // authorized if administrator has at least one role assigned to permission 
        return $this->getLoggedInAdministrator()->hasOneRoleByObject($permission->getRoles());
    }
public function isAuthorized ( string $ resource ) : bool { // get permission model object if ( null === $ permission = ( PermissionsEntityMapper :: getInstance ( ) ) -> getObjectByTitle ( $ resource , true ) ) { throw new Exceptions \ QueryResultsNotFoundException ( "Permission not found for: $resource" ) ; } // authorized if administrator has at least one role assigned to permission  return $ this -> getLoggedInAdministrator ( ) -> hasOneRoleByObject ( $ permission -> getRoles ( ) ) ; }
$resource matches permission.title
$resource matches permission . title