/** * Perform a single access check operation on a given attribute, object and (optionally) user * It is safe to assume that $attribute and $object's class pass supportsAttribute/supportsClass * $user can be one of the following: * a UserInterface object (fully authenticated user) * a string (anonymously authenticated user) * * @param string $attribute * @param Conference $object * @param UserInterface|string $user * * @return bool */ protected function isGranted($attribute, $object, $user = null) { if (!$object instanceof Conference) { $object = $object->getConference(); } if ($object->getId() == $this->cm->getConference()->getId()) { return true; } return false; }