fix create website / teams permissions

This commit is contained in:
Francis Cao 2024-02-22 22:21:11 -08:00
parent 8fbd6871f7
commit 490bb11771
5 changed files with 20 additions and 17 deletions

View file

@ -11,9 +11,9 @@ export function TeamMembersPage({ teamId }: { teamId: string }) {
const { user } = useLogin();
const { formatMessage, labels } = useMessages();
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 (
<>