diff --git a/src/api/oauth/auth.ts b/src/api/oauth/auth.ts index c76fb9f..dbcce8d 100644 --- a/src/api/oauth/auth.ts +++ b/src/api/oauth/auth.ts @@ -46,7 +46,7 @@ const AuthRoute = Stacker(GetUserMiddleware(true), async (req: Request, res: Res let permissions: IPermission[] = []; if (scope) { - let perms = (scope).split(";").map(p => new ObjectID(p)); + let perms = (scope).split(";").filter(e => e !== "read_user").map(p => new ObjectID(p)); permissions = await Permission.find({ _id: { $in: perms } }) if (permissions.length != perms.length) {