Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fixed team member lookup.

Mike Caoe015ce8779ca
diff --git a/src/app/api/teams/[teamId]/users/route.ts b/src/app/api/teams/[teamId]/users/route.ts
index 16b50fc7a..19cd61539 100644
--- a/src/app/api/teams/[teamId]/users/route.ts
+++ b/src/app/api/teams/[teamId]/users/route.ts
@@ -1,6 +1,6 @@
import { z } from 'zod';
import { unauthorized, json, badRequest } from '@/lib/response';
-import { canAddUserToTeam, canUpdateTeam } from '@/lib/auth';
+import { canAddUserToTeam, canViewTeam } from '@/lib/auth';
import { parseRequest } from '@/lib/request';
import { pagingParams, roleParam } from '@/lib/schema';
import { createTeamUser, getTeamUser, getTeamUsers } from '@/queries';
@@ -18,7 +18,7 @@ export async function GET(request: Request, { params }: { params: Promise<{ team
const { teamId } = await params;
- if (!(await canUpdateTeam(auth, teamId))) {
+ if (!(await canViewTeam(auth, teamId))) {
return unauthorized('You must be the owner of this team.');
}