Merge pull request #3654 from overleaf/tm-remove-v1-connection-error-message

Remove V1 connection error warning from projects dashboard

GitOrigin-RevId: 0820adfe385362f2854381bce94db8e953251573
This commit is contained in:
Thomas 2021-02-16 15:06:30 +01:00 committed by Copybot
parent 204117fcd1
commit 126c9c02a8
3 changed files with 0 additions and 51 deletions

View file

@ -402,7 +402,6 @@ const ProjectController = {
const timer = new metrics.Timer('project-list')
const userId = AuthenticationController.getLoggedInUserId(req)
const currentUser = AuthenticationController.getSessionUser(req)
let noV1Connection = false
let institutionLinkingError
async.parallel(
{
@ -424,7 +423,6 @@ const ProjectController = {
currentUser,
(error, hasPaidSubscription) => {
if (error != null && error instanceof V1ConnectionError) {
noV1Connection = true
return cb(null, true)
}
cb(error, hasPaidSubscription)
@ -443,7 +441,6 @@ const ProjectController = {
UserGetter.getUserFullEmails(userId, (error, fullEmails) => {
if (error && error instanceof V1ConnectionError) {
noV1Connection = true
return cb(null, result)
}
@ -593,7 +590,6 @@ const ProjectController = {
results.projects,
userId
)
const warnings = ProjectController._buildWarningsList(noV1Connection)
// in v2 add notifications for matching university IPs
if (Settings.overleaf != null && req.ip !== user.lastLoginIp) {
@ -618,7 +614,6 @@ const ProjectController = {
userEmails,
hasSubscription: results.hasSubscription,
institutionLinkingError,
warnings,
zipFileSizeLimit: Settings.maxUploadSize
}
@ -1049,14 +1044,6 @@ const ProjectController = {
)
},
_buildWarningsList(noConnection) {
return noConnection
? [
'Error accessing Overleaf V1. Some of your projects or features may be missing.'
]
: []
},
_buildPortalTemplatesList(affiliations) {
if (affiliations == null) {
affiliations = []

View file

@ -163,10 +163,6 @@
) #{translate("delete_and_leave")}
.row.row-spaced
each warning in warnings
.col-xs-12
.alert.alert-warning(role="alert")= warning
.col-xs-12
.card.card-thin.project-list-card
ul.list-unstyled.project-list.structured-list(

View file

@ -3,7 +3,6 @@ const path = require('path')
const sinon = require('sinon')
const { expect } = require('chai')
const { ObjectId } = require('mongodb')
const Errors = require('../../../../app/src/Features/Errors/Errors')
const MODULE_PATH = path.join(
__dirname,
@ -490,39 +489,6 @@ describe('ProjectController', function() {
this.ProjectController.projectListPage(this.req, this.res)
})
describe('when there is a v1 connection error', function() {
beforeEach(function() {
this.Features.hasFeature = sinon
.stub()
.withArgs('overleaf-integration')
.returns(true)
this.connectionWarning =
'Error accessing Overleaf V1. Some of your projects or features may be missing.'
})
it('should show a warning when there is an error getting subscriptions from v1', function(done) {
this.LimitationsManager.hasPaidSubscription.yields(
new Errors.V1ConnectionError('error')
)
this.res.render = (pageName, opts) => {
expect(opts.warnings).to.contain(this.connectionWarning)
done()
}
this.ProjectController.projectListPage(this.req, this.res)
})
it('should show a warning when there is an error getting full emails due to v1', function(done) {
this.UserGetter.getUserFullEmails.yields(
new Errors.V1ConnectionError('error')
)
this.res.render = (pageName, opts) => {
expect(opts.warnings).to.contain(this.connectionWarning)
done()
}
this.ProjectController.projectListPage(this.req, this.res)
})
})
describe('front widget', function(done) {
beforeEach(function() {
this.settings.overleaf = {