From 4f54d048c67b378d1a9b4621098fa754314ba5d8 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Thu, 14 Mar 2019 18:20:54 +0000 Subject: [PATCH] Improving Gitlab compatibility --- src/api/oauth/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {