Skip to content

Commit

Permalink
Add version.
Browse files Browse the repository at this point in the history
  • Loading branch information
briancao committed Feb 1, 2024
1 parent 6ab57a1 commit 5a8543f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.components.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@umami/components",
"version": "0.1.0",
"version": "0.40.0",
"description": "Umami React components.",
"author": "Mike Cao <[email protected]>",
"license": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions src/lib/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5a8543f

Please sign in to comment.