mirror of
https://github.com/BradNut/umami
synced 2025-09-08 17:40:29 +00:00
Remove admin panel if not team-owner
This commit is contained in:
parent
a47f94c577
commit
c302939043
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Reference in a new issue