mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Added saveli fixes nginx: only expose git-bridge project endpoints under /git/- #260
and git-bridge: reject personal access tokens of suspended users- #261
This commit is contained in:
@@ -101,14 +101,14 @@ const GitBridgePATManager = {
|
||||
|
||||
if (!objToken?.user_id) return null
|
||||
|
||||
// does the user still exists and not deleted?
|
||||
// does the user still exists and not deleted and not suspended?
|
||||
// tokens of a deleted user are not deleted until user expires
|
||||
const user = await db.users.findOne(
|
||||
{ _id: new ObjectId(objToken.user_id) },
|
||||
{ projection: { _id: 1 } }
|
||||
{ projection: { _id: 1, suspended: 1 } }
|
||||
)
|
||||
|
||||
if (!user) return null
|
||||
if (!user || user.suspended) return null
|
||||
|
||||
// non-blocking
|
||||
db.oauthAccessTokens.updateOne(
|
||||
|
||||
Reference in New Issue
Block a user