mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 20:31:34 +02:00
Merge pull request #13694 from overleaf/revert-13584-bg-managed-users-block-delete-own-account
Revert "block account deletion by managed users" GitOrigin-RevId: ece8024b2fac16066abd36af9a9670ba483b3628
This commit is contained in:
@@ -928,18 +928,12 @@ describe('UserController', function () {
|
||||
]
|
||||
this.Features.hasFeature.withArgs('affiliations').returns(true)
|
||||
this.req.query.ensureAffiliation = true
|
||||
this.req.assertPermission = sinon.stub()
|
||||
await this.UserController.promises.ensureAffiliationMiddleware(
|
||||
this.req,
|
||||
this.res,
|
||||
this.next
|
||||
)
|
||||
})
|
||||
it('should check the user has permission', function () {
|
||||
expect(this.req.assertPermission).to.have.been.calledWith(
|
||||
'add-affiliation'
|
||||
)
|
||||
})
|
||||
it('should unflag the emails but not confirm', function () {
|
||||
expect(
|
||||
this.UserUpdater.promises.addAffiliationForNewUser
|
||||
@@ -966,18 +960,12 @@ describe('UserController', function () {
|
||||
]
|
||||
this.Features.hasFeature.withArgs('affiliations').returns(true)
|
||||
this.req.query.ensureAffiliation = true
|
||||
this.req.assertPermission = sinon.stub()
|
||||
await this.UserController.promises.ensureAffiliationMiddleware(
|
||||
this.req,
|
||||
this.res,
|
||||
this.next
|
||||
)
|
||||
})
|
||||
it('should check the user has permission', function () {
|
||||
expect(this.req.assertPermission).to.have.been.calledWith(
|
||||
'add-affiliation'
|
||||
)
|
||||
})
|
||||
it('should add affiliation to v1, unflag and confirm on v2', function () {
|
||||
expect(this.UserUpdater.promises.addAffiliationForNewUser).to.have.not
|
||||
.been.called
|
||||
@@ -1004,18 +992,12 @@ describe('UserController', function () {
|
||||
]
|
||||
this.Features.hasFeature.withArgs('affiliations').returns(true)
|
||||
this.req.query.ensureAffiliation = true
|
||||
this.req.assertPermission = sinon.stub()
|
||||
await this.UserController.promises.ensureAffiliationMiddleware(
|
||||
this.req,
|
||||
this.res,
|
||||
this.next
|
||||
)
|
||||
})
|
||||
it('should check the user has permission', function () {
|
||||
expect(this.req.assertPermission).to.have.been.calledWith(
|
||||
'add-affiliation'
|
||||
)
|
||||
})
|
||||
it('should return the error', function () {
|
||||
expect(this.next).to.be.calledWith(sinon.match.instanceOf(Error))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user