Improving Gitlab compatibility 2
This commit is contained in:
parent
4f54d048c6
commit
cebd669044
@ -59,7 +59,7 @@ ViewRouter.get("/auth", Stacker(GetUserMiddleware(false, true), async (req, res)
|
|||||||
let permissions: IPermission[] = [];
|
let permissions: IPermission[] = [];
|
||||||
let proms: PromiseLike<void>[] = [];
|
let proms: PromiseLike<void>[] = [];
|
||||||
if (scope) {
|
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 => {
|
proms.push(Permission.findById(perm).then(p => {
|
||||||
if (!p) return Promise.reject(new Error());
|
if (!p) return Promise.reject(new Error());
|
||||||
permissions.push(p);
|
permissions.push(p);
|
||||||
|
Loading…
Reference in New Issue
Block a user