mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 23:27:12 +01:00
Open /websites endpoint to view all.
This commit is contained in:
parent
b314cc88f5
commit
467790b67a
3 changed files with 31 additions and 3 deletions
|
|
@ -59,6 +59,10 @@ export async function canViewWebsite({ user, shareToken }: Auth, websiteId: stri
|
|||
return !!(await findTeamWebsiteByUserId(websiteId, user.id));
|
||||
}
|
||||
|
||||
export async function canViewAllWebsite({ user }: Auth) {
|
||||
return user.isAdmin;
|
||||
}
|
||||
|
||||
export async function canCreateWebsite({ user, grant }: Auth) {
|
||||
if (cloudMode) {
|
||||
return !!grant?.find(a => a === PERMISSIONS.websiteCreate);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@ export const dateRange = {
|
|||
export const pageInfo = {
|
||||
query: yup.string(),
|
||||
page: yup.number().integer().positive(),
|
||||
pageSize: yup.number().integer().positive().max(200),
|
||||
pageSize: yup.number().integer().positive().min(1).max(200),
|
||||
orderBy: yup.string(),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue