check for explicit teamCreate permissions for global role in canCreateTeam

This commit is contained in:
Francis Cao 2026-01-22 11:53:11 -08:00
parent 8b2196b97a
commit a1efb2d86a

View file

@ -16,7 +16,7 @@ export async function canCreateTeam({ user }: Auth) {
return true; return true;
} }
return !!user; return hasPermission(user.role, PERMISSIONS.teamCreate);
} }
export async function canUpdateTeam({ user }: Auth, teamId: string) { export async function canUpdateTeam({ user }: Auth, teamId: string) {