mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Remove admin panel if not team-owner
This commit is contained in:
parent
a47f94c577
commit
c302939043
@ -26,10 +26,10 @@ export function TeamDetails({ teamId }: { teamId: string }) {
|
|||||||
</PageHeader>
|
</PageHeader>
|
||||||
<Tabs selectedKey={tab} onSelect={(value: any) => setTab(value)} style={{ marginBottom: 30 }}>
|
<Tabs selectedKey={tab} onSelect={(value: any) => setTab(value)} style={{ marginBottom: 30 }}>
|
||||||
<Item key="details">{formatMessage(labels.details)}</Item>
|
<Item key="details">{formatMessage(labels.details)}</Item>
|
||||||
<Item key="admin">{formatMessage(labels.admin)}</Item>
|
{canEdit && <Item key="admin">{formatMessage(labels.admin)}</Item>}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
{tab === 'details' && <TeamEditForm teamId={teamId} allowEdit={canEdit} />}
|
{tab === 'details' && <TeamEditForm teamId={teamId} allowEdit={canEdit} />}
|
||||||
{canEdit && tab === 'admin' && <TeamAdmin teamId={teamId} />}
|
{tab === 'admin' && <TeamAdmin teamId={teamId} />}
|
||||||
</Flexbox>
|
</Flexbox>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user