mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 20:45:39 +01:00
Merge branch 'master' into db-merge-test
This commit is contained in:
commit
00a7272ec7
44 changed files with 3303 additions and 228 deletions
|
|
@ -40,7 +40,7 @@ export function isValidToken(token, validation) {
|
|||
return false;
|
||||
}
|
||||
|
||||
export async function allowQuery(req, type) {
|
||||
export async function allowQuery(req, type, allowShareToken = true) {
|
||||
const { id } = req.query;
|
||||
|
||||
const { userId, isAdmin, shareToken } = req.auth ?? {};
|
||||
|
|
@ -49,7 +49,7 @@ export async function allowQuery(req, type) {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (shareToken) {
|
||||
if (allowShareToken && shareToken) {
|
||||
return isValidToken(shareToken, { id });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue