diff --git a/lib/Controller/ServerController.php b/lib/Controller/ServerController.php index fd1eaf5..a3c22bf 100644 --- a/lib/Controller/ServerController.php +++ b/lib/Controller/ServerController.php @@ -88,12 +88,18 @@ class ServerController extends Controller { return new DataResponse([], Http::STATUS_NOT_FOUND); } - if (!$this->permission->isAdmin($room, $this->userId)) { + if (!$this->permission->isUser($room, $this->userId)) { return new DataResponse([], Http::STATUS_FORBIDDEN); } $recordings = $this->server->getRecordings($room); + if (!$this->permission->isAdmin($room, $this->userId)) { + $recordings = array_filter($recordings, function ($recording) { + return $recording['published']; + }); + } + return new DataResponse($recordings); } diff --git a/ts/Common/Translation.ts b/ts/Common/Translation.ts index d80eb5d..8d78cf7 100644 --- a/ts/Common/Translation.ts +++ b/ts/Common/Translation.ts @@ -1,4 +1,4 @@ -import { Access } from './Api'; +import { Access, Permission } from './Api'; export const AccessOptions = { [Access.Public]: t('bbb', 'Public'), @@ -8,3 +8,9 @@ export const AccessOptions = { [Access.Internal]: t('bbb', 'Internal'), [Access.InternalRestricted]: t('bbb', 'Internal restricted'), }; + +export const PermissionsOptions = { + [Permission.Admin]: t('bbb', 'admin'), + [Permission.Moderator]: t('bbb', 'moderator'), + [Permission.User]: t('bbb', 'user'), +}; diff --git a/ts/Manager/App.scss b/ts/Manager/App.scss index 1a0458c..96ff82d 100644 --- a/ts/Manager/App.scss +++ b/ts/Manager/App.scss @@ -282,6 +282,10 @@ pre { } } +.bbb-simple-menu { + min-width: auto; +} + .bbb-input-container { display: flex; } diff --git a/ts/Manager/EditRoomDialog.tsx b/ts/Manager/EditRoomDialog.tsx index a0b1bde..d54dbd9 100644 --- a/ts/Manager/EditRoomDialog.tsx +++ b/ts/Manager/EditRoomDialog.tsx @@ -123,17 +123,18 @@ const EditRoomDialog: React.FC = ({ room, restriction, updateProperty, op updateProperty('access', value); })} - {room.access === Access.InternalRestricted &&
- - {descriptions.internalRestrictedShareWith} -
} -
-