mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 09:35:36 +01:00
fix create website / teams permissions
This commit is contained in:
parent
8fbd6871f7
commit
490bb11771
5 changed files with 20 additions and 17 deletions
|
|
@ -1,11 +1,16 @@
|
|||
'use client';
|
||||
import { useLogin } from 'components/hooks';
|
||||
import WebsitesDataTable from './WebsitesDataTable';
|
||||
import WebsitesHeader from './WebsitesHeader';
|
||||
import { ROLES } from 'lib/constants';
|
||||
|
||||
export default function WebsitesSettingsPage({ teamId }: { teamId: string }) {
|
||||
const { user } = useLogin();
|
||||
const canCreate = user.role !== ROLES.viewOnly;
|
||||
|
||||
return (
|
||||
<>
|
||||
<WebsitesHeader teamId={teamId} />
|
||||
<WebsitesHeader teamId={teamId} allowCreate={canCreate} />
|
||||
<WebsitesDataTable teamId={teamId} />
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue