Improving Gitlab compatibility
This commit is contained in:
parent
e800dd266a
commit
4f54d048c6
@ -46,7 +46,7 @@ const AuthRoute = Stacker(GetUserMiddleware(true), async (req: Request, res: Res
|
|||||||
|
|
||||||
let permissions: IPermission[] = [];
|
let permissions: IPermission[] = [];
|
||||||
if (scope) {
|
if (scope) {
|
||||||
let perms = (<string>scope).split(";").map(p => new ObjectID(p));
|
let perms = (<string>scope).split(";").filter(e => e !== "read_user").map(p => new ObjectID(p));
|
||||||
permissions = await Permission.find({ _id: { $in: perms } })
|
permissions = await Permission.find({ _id: { $in: perms } })
|
||||||
|
|
||||||
if (permissions.length != perms.length) {
|
if (permissions.length != perms.length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user