The commit refactors the handling of account roles and enhances permissions checks. The account role has been shifted to use a string type, providing the ability to define custom roles. It also introduces the RolesDataProvider component, which stipulates role-related data for different forms and tables. The modification goes further to consider user role hierarchy in permissions checks, offering a more granular access control.
21 lines
619 B
TypeScript
21 lines
619 B
TypeScript
import { allDocumentationPages } from 'contentlayer/generated';
|
|
|
|
import DocsNavigation from '~/(marketing)/docs/_components/docs-navigation';
|
|
import { buildDocumentationTree } from '~/(marketing)/docs/_lib/build-documentation-tree';
|
|
|
|
function DocsLayout({ children }: React.PropsWithChildren) {
|
|
const tree = buildDocumentationTree(allDocumentationPages);
|
|
|
|
return (
|
|
<div className={'container mx-auto'}>
|
|
<div className={'flex'}>
|
|
<DocsNavigation tree={tree} />
|
|
|
|
<div className={'flex w-full flex-col items-center'}>{children}</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default DocsLayout;
|