protected function checkOrganizationPermissions($role, $resource)
    {
        /* @var $resource \Jobs\Entity\JobInterface */
        /* @var $role     \Auth\Entity\UserInterface */
        $organization = $resource->getOrganization();
        if (!$organization) {
            return false;
        }

        if ($organization->isHiringOrganization()) {
            $organization = $organization->getParent();
        }

        $orgUser = $organization->getUser();

        if ($orgUser && $role->getId() == $orgUser->getId()) {
            return true;
        }

        $employees = $organization->getEmployees();

        foreach ($employees as $emp) {
            /* @var $emp \Organizations\Entity\EmployeeInterface */
            if ($emp->getUser()->getId() == $role->getId()
                && $emp->getPermissions()->isAllowed(EmployeePermissionsInterface::JOBS_CHANGE)
            ) {
                return true;
            }
        }

        return false;
    }