The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/admin/settings/SettingsRoute.js

20 lines
566 B

import React from 'react';
import { usePrivilegedSettingsAuthorized } from '../../contexts/PrivilegedSettingsContext';
import { useRouteParameter } from '../../contexts/RouterContext';
import { GroupSelector } from './GroupSelector';
import NotAuthorizedPage from '../NotAuthorizedPage';
export function SettingsRoute() {
const hasPermission = usePrivilegedSettingsAuthorized();
const groupId = useRouteParameter('group');
if (!hasPermission) {
return <NotAuthorizedPage />;
}
return <GroupSelector groupId={groupId} />;
}
export default SettingsRoute;