private function hasSurveyRight(Survey $survey, $right) { $collection = new ResourceCollection([$survey->getResourceNode()]); return $this->authorization->isGranted($right, $collection); }
public function __construct(Survey $survey, User $user) { parent::__construct(self::ACTION, array(), $user, null, $survey->getResourceNode(), null, $survey->getResourceNode()->getWorkspace()); }