mirror of
https://github.com/strapi/strapi.git
synced 2025-09-07 07:41:08 +00:00
Add No permissions view
Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
parent
e8eed84e75
commit
b40b4ff14b
@ -12,6 +12,7 @@ import ModelsContext from '../../contexts/ModelsContext';
|
|||||||
import CollectionTypeRecursivePath from '../CollectionTypeRecursivePath';
|
import CollectionTypeRecursivePath from '../CollectionTypeRecursivePath';
|
||||||
import ComponentSettingsView from '../ComponentSetttingsView';
|
import ComponentSettingsView from '../ComponentSetttingsView';
|
||||||
import NoContentType from '../NoContentType';
|
import NoContentType from '../NoContentType';
|
||||||
|
import NoPermissions from '../NoPermissions';
|
||||||
import SingleTypeRecursivePath from '../SingleTypeRecursivePath';
|
import SingleTypeRecursivePath from '../SingleTypeRecursivePath';
|
||||||
import LeftMenu from './LeftMenu';
|
import LeftMenu from './LeftMenu';
|
||||||
import useModels from './useModels';
|
import useModels from './useModels';
|
||||||
@ -78,11 +79,9 @@ const App = () => {
|
|||||||
/>
|
/>
|
||||||
<Route path="/content-manager/singleType/:slug" component={SingleTypeRecursivePath} />
|
<Route path="/content-manager/singleType/:slug" component={SingleTypeRecursivePath} />
|
||||||
|
|
||||||
{/* These pages must be defined */}
|
<Route path="/content-manager/403">
|
||||||
<Route
|
<NoPermissions />
|
||||||
path="/content-manager/403"
|
</Route>
|
||||||
render={() => <div>TBD No rights to see the content types</div>}
|
|
||||||
/>
|
|
||||||
<Route path="/content-manager/no-content-types">
|
<Route path="/content-manager/no-content-types">
|
||||||
<NoContentType />
|
<NoContentType />
|
||||||
</Route>
|
</Route>
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { CustomContentLayout, useFocusWhenNavigate } from '@strapi/helper-plugin';
|
||||||
|
import { Main } from '@strapi/parts/Main';
|
||||||
|
import { HeaderLayout } from '@strapi/parts/Layout';
|
||||||
|
import { useIntl } from 'react-intl';
|
||||||
|
import { getTrad } from '../../utils';
|
||||||
|
|
||||||
|
const NoPermissions = () => {
|
||||||
|
const { formatMessage } = useIntl();
|
||||||
|
useFocusWhenNavigate();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Main labelledBy="title">
|
||||||
|
<HeaderLayout
|
||||||
|
id="title"
|
||||||
|
title={formatMessage({
|
||||||
|
id: getTrad('header.name'),
|
||||||
|
defaultMessage: 'Content',
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
<CustomContentLayout canRead={false}>
|
||||||
|
<div />
|
||||||
|
</CustomContentLayout>
|
||||||
|
</Main>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default NoPermissions;
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user