mirror of
https://github.com/umami-software/umami.git
synced 2026-02-24 22:45: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
|
|
@ -15,9 +15,9 @@ export function TeamDetails({ teamId }: { teamId: string }) {
|
|||
const { user } = useLogin();
|
||||
const [tab, setTab] = useState('details');
|
||||
|
||||
const canEdit = !!team?.teamUser?.find(
|
||||
({ userId, role }) => role === ROLES.teamOwner && userId === user.id,
|
||||
);
|
||||
const canEdit =
|
||||
!!team?.teamUser?.find(({ userId, role }) => role === ROLES.teamOwner && userId === user.id) &&
|
||||
user.role !== ROLES.viewOnly;
|
||||
|
||||
return (
|
||||
<Flexbox direction="column">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue