mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Add version.
This commit is contained in:
parent
6ab57a1ace
commit
5a8543fd25
2 changed files with 5 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@umami/components",
|
||||
"version": "0.1.0",
|
||||
"version": "0.40.0",
|
||||
"description": "Umami React components.",
|
||||
"author": "Mike Cao <mike@mikecao.com>",
|
||||
"license": "MIT",
|
||||
|
|
|
|||
|
|
@ -166,14 +166,14 @@ export async function canViewTeam({ user }: Auth, teamId: string) {
|
|||
}
|
||||
|
||||
export async function canUpdateTeam({ user, grant }: Auth, teamId: string) {
|
||||
if (cloudMode) {
|
||||
return !!grant?.find(a => a === PERMISSIONS.teamUpdate);
|
||||
}
|
||||
|
||||
if (user.isAdmin) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (cloudMode) {
|
||||
return !!grant?.find(a => a === PERMISSIONS.teamUpdate);
|
||||
}
|
||||
|
||||
const teamUser = await getTeamUser(teamId, user.id);
|
||||
|
||||
return teamUser && hasPermission(teamUser.role, PERMISSIONS.teamUpdate);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue