diff options
author | Joas Schilling <coding@schilljs.com> | 2022-06-13 14:56:01 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-06-13 14:56:01 +0300 |
commit | 55bb6c066cb4132bc083079fc84a5310185f39e2 (patch) | |
tree | ce6bec4bde169002f9099b58af3d7860c2839ae5 /lib | |
parent | ec24253ca490f58be16d2b5b08ab6213da6918cb (diff) |
Don't allow updating/voting after closingfeature/noid/simple-polls
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/PollController.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Controller/PollController.php b/lib/Controller/PollController.php index 9ed4c305f..fdf6277d3 100644 --- a/lib/Controller/PollController.php +++ b/lib/Controller/PollController.php @@ -155,6 +155,10 @@ class PollController extends AEnvironmentAwareController { return new DataResponse([], Http::STATUS_NOT_FOUND); } + if ($poll->getStatus() === Poll::STATUS_CLOSED) { + return new DataResponse([], Http::STATUS_BAD_REQUEST); + } + try { $votedSelf = $this->pollService->votePoll($this->participant, $poll, $optionIds); } catch (\RuntimeException $e) { |