mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
Restrict the object rooms that can be created
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
ffd0f2525e
commit
249a34da96
2 changed files with 9 additions and 1 deletions
|
|
@ -825,6 +825,8 @@ class RoomController extends AEnvironmentAwareController {
|
|||
} catch (ParticipantNotFoundException $e) {
|
||||
return new DataResponse(['error' => 'permissions'], Http::STATUS_BAD_REQUEST);
|
||||
}
|
||||
} elseif ($objectType !== '') {
|
||||
return new DataResponse(['error' => 'object'], Http::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
// Create the room
|
||||
|
|
|
|||
|
|
@ -584,12 +584,18 @@ Feature: conversation/breakout-rooms
|
|||
| 2 | class room | 0 | 1 | 0 |
|
||||
| 2 | Room 1 | 1 | 0 | 0 |
|
||||
| 2 | Room 2 | 1 | 0 | 0 |
|
||||
# Can not nest
|
||||
# Can not nest breakout rooms
|
||||
Given user "participant1" creates room "Room 3" with 400 (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | Room 3 |
|
||||
| objectType | room |
|
||||
| objectId | ROOM(Room 2) |
|
||||
# Can not create room for other object types
|
||||
Given user "participant1" creates room "Room 3" with 400 (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | Room 3 |
|
||||
| objectType | files |
|
||||
| objectId | ROOM(class room) |
|
||||
Given user "participant1" creates room "Room 3" with 201 (v4)
|
||||
| roomType | 2 |
|
||||
| roomName | Room 3 |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue