mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-11 07:00:47 +02:00
Merge pull request #13584 from overleaf/bg-managed-users-block-delete-own-account
block account deletion by managed users GitOrigin-RevId: 895e5e31951bf60cfade4cf7acc3ef330df214e6
This commit is contained in:
@@ -194,6 +194,11 @@ async function ensureAffiliationMiddleware(req, res, next) {
|
||||
} catch (error) {
|
||||
return new Errors.UserNotFoundError({ info: { userId } })
|
||||
}
|
||||
try {
|
||||
req.assertPermission('add-affiliation')
|
||||
} catch (error) {
|
||||
return next(error)
|
||||
}
|
||||
try {
|
||||
await ensureAffiliation(user)
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user