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 auth check.

Mike Caob8cb47a47629
diff --git a/lib/auth.ts b/lib/auth.ts
index 60592bf34..f1f2b108f 100644
--- a/lib/auth.ts
+++ b/lib/auth.ts
@@ -80,8 +80,8 @@ export async function canViewWebsite({ user, shareToken }: Auth, websiteId: stri
const website = await loadWebsite(websiteId);
- if (website.userId) {
- return user.id === website.userId;
+ if (user.id === website.userId) {
+ return true;
}
return !!(await findTeamWebsiteByUserId(websiteId, user.id));