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.

Fix non-admin dashboard.

Mike Caoc932dc2810f9
diff --git a/package.json b/package.json
index 15de064c3..4cb3b8582 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "umami",
- "version": "0.37.0",
+ "version": "0.38.0",
"description": "A simple, fast, website analytics alternative to Google Analytics. ",
"author": "Mike Cao <[email protected]>",
"license": "MIT",
diff --git a/pages/api/websites.js b/pages/api/websites.js
index 42b6182c7..6f51754fd 100644
--- a/pages/api/websites.js
+++ b/pages/api/websites.js
@@ -10,7 +10,7 @@ export default async (req, res) => {
const userId = +user_id;
if (req.method === 'GET') {
- if (userId !== current_user_id && !is_admin) {
+ if (userId && userId !== current_user_id && !is_admin) {
return unauthorized(res);
}