plugin/exo/Controller/Api/AttemptController.php
private function assertHasPaperAccess(Paper $paper, User $user = null)
    {
        if (!$this->attemptManager->canUpdate($paper, $user)) {
            throw new AccessDeniedException();
        }
    }
private function assertHasPaperAccess(Paper $paper, User $user = null)
    {
        if (!$this->attemptManager->canUpdate($paper, $user)) {
            throw new AccessDeniedException();
        }
    }
private function assertHasPaperAccess ( Paper $ paper , User $ user = null ) { if ( ! $ this -> attemptManager -> canUpdate ( $ paper , $ user ) ) { throw new AccessDeniedException ( ) ; } }
Checks whether a User has access to a Paper.

@param Paper $paper
@param User  $user

@throws AccessDeniedException
Checks whether a User has access to a Paper .