зеркало из https://github.com/nextcloud/spreed.git
Do not allow to demote yourself
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
451bd8e82b
Коммит
c15645a730
|
@ -592,6 +592,10 @@ class RoomController extends OCSController {
|
|||
return new DataResponse([], Http::STATUS_NOT_FOUND);
|
||||
}
|
||||
|
||||
if ($this->userId === $participant) {
|
||||
return new DataResponse([], Http::STATUS_FORBIDDEN);
|
||||
}
|
||||
|
||||
if (!in_array($currentParticipant->getParticipantType(), [Participant::OWNER, Participant::MODERATOR], true)) {
|
||||
return new DataResponse([], Http::STATUS_FORBIDDEN);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче