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

23 lines
703 B

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