diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/PollController.php | 4 | ||||
-rw-r--r-- | lib/Middleware/InjectionMiddleware.php | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/Controller/PollController.php b/lib/Controller/PollController.php index b4950692a..0763339ed 100644 --- a/lib/Controller/PollController.php +++ b/lib/Controller/PollController.php @@ -77,8 +77,8 @@ class PollController extends AEnvironmentAwareController { * @return DataResponse */ public function createPoll(string $question, array $options, int $resultMode, int $maxVotes): DataResponse { - if ($this->room->getType() === Room::TYPE_ONE_TO_ONE - || $this->room->getType() === Room::TYPE_ONE_TO_ONE_FORMER) { + if ($this->room->getType() !== Room::TYPE_GROUP + && $this->room->getType() !== Room::TYPE_PUBLIC) { return new DataResponse([], Http::STATUS_BAD_REQUEST); } diff --git a/lib/Middleware/InjectionMiddleware.php b/lib/Middleware/InjectionMiddleware.php index fc8e4bcad..de5110710 100644 --- a/lib/Middleware/InjectionMiddleware.php +++ b/lib/Middleware/InjectionMiddleware.php @@ -200,6 +200,9 @@ class InjectionMiddleware extends Middleware { if (!$room instanceof Room || $room->getReadOnly() === Room::READ_ONLY) { throw new ReadOnlyException(); } + if ($room->getType() === Room::TYPE_CHANGELOG) { + throw new ReadOnlyException(); + } } /** |