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:
David Rotermund
2026-10-24 17:47:06 +00:00
parent 9fd8182bd2
commit 3e223354fc
2 changed files with 27 additions and 3 deletions
@@ -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(