Improving Gitlab compatibility 2

This commit is contained in:
Fabian Stamm 2019-03-14 18:22:01 +00:00
parent 4f54d048c6
commit cebd669044

View File

@ -59,7 +59,7 @@ ViewRouter.get("/auth", Stacker(GetUserMiddleware(false, true), async (req, res)
let permissions: IPermission[] = [];
let proms: PromiseLike<void>[] = [];
if (scope) {
for (let perm of scope.split(";")) {
for (let perm of scope.split(";").filter(e => e !== "read_user")) {
proms.push(Permission.findById(perm).then(p => {
if (!p) return Promise.reject(new Error());
permissions.push(p);