diff --git a/packages/admin/src/utils/permission.ts b/packages/admin/src/utils/permission.ts index 99a2921c..59294d53 100644 --- a/packages/admin/src/utils/permission.ts +++ b/packages/admin/src/utils/permission.ts @@ -1,5 +1,8 @@ import { RoleEnum, User } from '@mlem-admin/types/user'; export const isAdmin = (user: User) => { - return user.roles && user.roles.includes(RoleEnum.ADMIN); + return ( + (user.roles && user.roles.includes(RoleEnum.ADMIN)) || + (user.roles && user.roles.includes(RoleEnum.USER)) + ); };