Skip to content
Snippets Groups Projects
Unverified Commit 6dc6eb75 authored by Samuel Couillard's avatar Samuel Couillard Committed by GitHub
Browse files

Allow ManageRooms to view other rooms (#4076)

* Allow ManageRooms to view other rooms

* Add ManageRooms permission to rooms config

* esf
parent adb375f0
Branches
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ module Api
module V1
class RoomsConfigurationsController < ApiController
before_action only: %i[index] do
ensure_authorized(%w[CreateRoom ManageSiteSettings ManageRoles], friendly_id: params[:friendly_id])
ensure_authorized(%w[CreateRoom ManageSiteSettings ManageRoles ManageRooms], friendly_id: params[:friendly_id])
end
# GET /api/v1/rooms_configurations.json
......
......@@ -9,12 +9,15 @@ import Presentation from './presentation/Presentation';
import RoomSettings from './room_settings/RoomSettings';
import useSiteSetting from '../../../hooks/queries/site_settings/useSiteSetting';
import SharedAccess from './shared_access/SharedAccess';
import { useAuth } from '../../../contexts/auth/AuthProvider';
export default function FeatureTabs({ shared }) {
const { t } = useTranslation();
const { isLoading: isLoadingPreup, data: preuploadEnabled } = useSiteSetting('PreuploadPresentation');
const { isLoading: isLoadingShare, data: shareRoomEnabled } = useSiteSetting('ShareRooms');
const currentUser = useAuth();
if (isLoadingPreup || isLoadingShare) {
return (
<Row className="pt-4 mx-0">
......@@ -28,8 +31,8 @@ export default function FeatureTabs({ shared }) {
);
}
// Returns only the Recording tab if the room is a Shared Room
if (shared) {
// Returns only the Recording tab if the room is a Shared Room and the User does not have the ManageRoom permission
if (shared && !currentUser?.permissions?.ManageRooms) {
return (
<Row className="pt-4 mx-0">
<Tabs defaultActiveKey="recordings" unmountOnExit>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment