mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Fixed team member lookup.
This commit is contained in:
parent
b3f7694852
commit
e015ce8779
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
import { unauthorized, json, badRequest } from '@/lib/response';
|
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 { parseRequest } from '@/lib/request';
|
||||||
import { pagingParams, roleParam } from '@/lib/schema';
|
import { pagingParams, roleParam } from '@/lib/schema';
|
||||||
import { createTeamUser, getTeamUser, getTeamUsers } from '@/queries';
|
import { createTeamUser, getTeamUser, getTeamUsers } from '@/queries';
|
||||||
|
|
@ -18,7 +18,7 @@ export async function GET(request: Request, { params }: { params: Promise<{ team
|
||||||
|
|
||||||
const { teamId } = await params;
|
const { teamId } = await params;
|
||||||
|
|
||||||
if (!(await canUpdateTeam(auth, teamId))) {
|
if (!(await canViewTeam(auth, teamId))) {
|
||||||
return unauthorized('You must be the owner of this team.');
|
return unauthorized('You must be the owner of this team.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue