public function VotingApiController::resetVoteAccess in Vote Up/Down 8
Checks if the currentUser is allowed to reset vote.
Return value
\Drupal\Core\Access\AccessResult|\Drupal\Core\Access\AccessResultAllowed The access result.
1 string reference to 'VotingApiController::resetVoteAccess'
File
- src/
Controller/ VotingApiController.php, line 157
Class
- VotingApiController
- Controller for voting.
Namespace
Drupal\vud\ControllerCode
public function resetVoteAccess() {
// Check if user has permission to vote.
if (!vud_can_reset_vote($this
->currentUser())) {
return AccessResult::forbidden();
}
else {
return AccessResultAllowed::allowed();
}
}