Merge pull request #16859 from overleaf/jpa-sharelatex-cleanup

[misc] ShareLaTeX cleanup - high impact

GitOrigin-RevId: 6dcce9b0f15e30f7afcf6d69c3df36a369f38120
This commit is contained in:
Jakob Ackermann 2024-02-06 09:34:15 +00:00 committed by Copybot
parent 537c822789
commit 63520c7076
76 changed files with 176 additions and 189 deletions

View file

@ -15,6 +15,6 @@ REALTIME_HOST=real-time
REDIS_HOST=redis
SPELLING_HOST=spelling
WEBPACK_HOST=webpack
WEB_API_PASSWORD=sharelatex
WEB_API_USER=sharelatex
WEB_API_PASSWORD=overleaf
WEB_API_USER=overleaf
WEB_HOST=web

View file

@ -50,20 +50,20 @@ services:
## Set for SSL via nginx-proxy
#VIRTUAL_HOST: 103.112.212.22
# SHARELATEX_SITE_URL: http://sharelatex.mydomain.com
# SHARELATEX_NAV_TITLE: Our ShareLaTeX Instance
# SHARELATEX_HEADER_IMAGE_URL: http://somewhere.com/mylogo.png
# SHARELATEX_SITE_URL: http://overleaf.example.com
# SHARELATEX_NAV_TITLE: Overleaf Community Edition
# SHARELATEX_HEADER_IMAGE_URL: http://example.com/mylogo.png
# SHARELATEX_ADMIN_EMAIL: support@it.com
# SHARELATEX_LEFT_FOOTER: '[{"text": "Powered by <a href=\"https://www.sharelatex.com\">ShareLaTeX</a> 2016"},{"text": "Another page I want to link to can be found <a href=\"here\">here</a>"} ]'
# SHARELATEX_LEFT_FOOTER: '[{"text": "Another page I want to link to can be found <a href=\"here\">here</a>"} ]'
# SHARELATEX_RIGHT_FOOTER: '[{"text": "Hello I am on the Right"} ]'
# SHARELATEX_EMAIL_FROM_ADDRESS: "team@sharelatex.com"
# SHARELATEX_EMAIL_FROM_ADDRESS: "hello@example.com"
# SHARELATEX_EMAIL_AWS_SES_ACCESS_KEY_ID:
# SHARELATEX_EMAIL_AWS_SES_SECRET_KEY:
# SHARELATEX_EMAIL_SMTP_HOST: smtp.mydomain.com
# SHARELATEX_EMAIL_SMTP_HOST: smtp.example.com
# SHARELATEX_EMAIL_SMTP_PORT: 587
# SHARELATEX_EMAIL_SMTP_SECURE: false
# SHARELATEX_EMAIL_SMTP_USER:

View file

@ -147,7 +147,7 @@ const LoggingManager = {
},
}
LoggingManager.initialize('default-sharelatex')
LoggingManager.initialize('default')
function handleWarning(err) {
LoggingManager.warn({ err }, 'Warning details')

View file

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014 ShareLaTeX
Copyright (c) 2024 Overleaf
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -5,7 +5,7 @@ const path = require('path')
/**
* Regular expressions for Overleaf v2 taken from
* https://github.com/sharelatex/web-sharelatex/blob/master/app/coffee/Features/Project/SafePath.coffee
* https://github.com/overleaf/internal/blob/f7b287b6a07354000a6b463ca3a5828104e4a811/services/web/app/src/Features/Project/SafePath.js
*/
//

View file

@ -8,9 +8,9 @@ Settings file location
----------------------
You can specify a custom location for the settings file by setting the
`SHARELATEX_CONFIG` environment variable. E.g.
`OVERLEAF_CONFIG` environment variable. E.g.
$ export SHARELATEX_CONFIG=/home/james/config/settings.development.js
$ export OVERLEAF_CONFIG=/home/james/config/settings.development.js
Otherwise, the settings will be loaded from `config/settings.NODE_ENV.js`,
where `NODE_ENV` is another environment variable, or defaults to `development`.

View file

@ -9,6 +9,12 @@ const ENTRY_POINT_DIR = process.argv[1]
: undefined
const NODE_ENV = (process.env.NODE_ENV || 'development').toLowerCase()
const SHARELATEX_CONFIG = process.env.SHARELATEX_CONFIG
const OVERLEAF_CONFIG = process.env.OVERLEAF_CONFIG || SHARELATEX_CONFIG
if (SHARELATEX_CONFIG && SHARELATEX_CONFIG !== OVERLEAF_CONFIG) {
throw new Error(
'found mismatching SHARELATEX_CONFIG, rename to OVERLEAF_CONFIG'
)
}
let settings
let settingsExist = false
@ -26,7 +32,7 @@ if (defaultsPath) {
}
const overridesPath =
pathIfExists(SHARELATEX_CONFIG) ||
pathIfExists(OVERLEAF_CONFIG) ||
pathIfExists(Path.join(CWD, `config/settings.${NODE_ENV}.cjs`)) ||
pathIfExists(Path.join(CWD, `config/settings.${NODE_ENV}.js`))
if (overridesPath) {

View file

@ -84,9 +84,9 @@ RUN touch $SITE_MAINTENANCE_FILE
# Set Environment Variables
# --------------------------------
ENV SHARELATEX_CONFIG /etc/sharelatex/settings.js
ENV OVERLEAF_CONFIG /etc/sharelatex/settings.js
ENV WEB_API_USER "sharelatex"
ENV WEB_API_USER "overleaf"
ENV ADMIN_PRIVILEGE_AVAILABLE "true"
ENV SHARELATEX_APP_NAME "Overleaf Community Edition"

View file

@ -18,10 +18,12 @@ const Path = require('path')
// These credentials are used for authenticating api requests
// between services that may need to go over public channels
const httpAuthUser = 'sharelatex'
const httpAuthUser = process.env.WEB_API_USER
const httpAuthPass = process.env.WEB_API_PASSWORD
const httpAuthUsers = {}
httpAuthUsers[httpAuthUser] = httpAuthPass
if (httpAuthUser && httpAuthPass) {
httpAuthUsers[httpAuthUser] = httpAuthPass
}
const parse = function (option) {
if (option != null) {
@ -58,7 +60,7 @@ const settings = {
// Databases
// ---------
// ShareLaTeX's main persistent data store is MongoDB (http://www.mongodb.org/)
// Overleaf Community Edition's main persistent data store is MongoDB (http://www.mongodb.org/)
// Documentation about the URL connection string format can be found at:
//
// http://docs.mongodb.org/manual/reference/connection-string/
@ -68,7 +70,7 @@ const settings = {
url: process.env.SHARELATEX_MONGO_URL || 'mongodb://dockerhost/sharelatex',
},
// Redis is used in ShareLaTeX for high volume queries, like real-time
// Redis is used in Overleaf Community Edition for high volume queries, like real-time
// editing, and session management.
//
// The following config will work with Redis's default settings:
@ -175,15 +177,15 @@ const settings = {
// Server Config
// -------------
// Where your instance of ShareLaTeX can be found publicly. This is used
// Where your instance of Overleaf Community Edition can be found publicly. This is used
// when emails are sent out and in generated links:
siteUrl: (siteUrl = process.env.SHARELATEX_SITE_URL || 'http://localhost'),
// Status page URL as displayed on the maintenance/500 pages.
statusPageUrl: process.env.SHARELATEX_STATUS_PAGE_URL,
// The name this is used to describe your ShareLaTeX Installation
appName: process.env.SHARELATEX_APP_NAME || 'ShareLaTeX (Community Edition)',
// The name this is used to describe your Overleaf Community Edition Installation
appName: process.env.SHARELATEX_APP_NAME || 'Overleaf Community Edition',
restrictInvitesToExistingAccounts:
process.env.SHARELATEX_RESTRICT_INVITES_TO_EXISTING_ACCOUNTS === 'true',
@ -192,11 +194,11 @@ const settings = {
title:
process.env.SHARELATEX_NAV_TITLE ||
process.env.SHARELATEX_APP_NAME ||
'ShareLaTeX Community Edition',
'Overleaf Community Edition',
},
// The email address which users will be directed to as the main point of
// contact for this installation of ShareLaTeX.
// contact for this installation of Overleaf Community Edition.
adminEmail: process.env.SHARELATEX_ADMIN_EMAIL || 'placeholder@example.com',
// If provided, a sessionSecret is used to sign cookies so that they cannot be
@ -218,11 +220,11 @@ const settings = {
// but should be set to true in production.
cacheStaticAssets: true,
// If you are running ShareLaTeX over https, set this to true to send the
// If you are running Overleaf Community Edition over https, set this to true to send the
// cookie with a secure flag (recommended).
secureCookie: process.env.SHARELATEX_SECURE_COOKIE != null,
// If you are running ShareLaTeX behind a proxy (like Apache, Nginx, etc)
// If you are running Overleaf Community Edition behind a proxy (like Apache, Nginx, etc)
// then set this to true to allow it to correctly detect the forwarded IP
// address and http/https protocol information.
@ -317,7 +319,7 @@ if (process.env.SHARELATEX_HEADER_NAV_LINKS != null) {
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# WARNING: SHARELATEX_HEADER_NAV_LINKS is no longer supported
# See https://github.com/sharelatex/sharelatex/wiki/Configuring-Headers,-Footers-&-Logo
# See https://github.com/overleaf/overleaf/wiki/Configuring-Headers,-Footers-&-Logo
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\
`)
@ -338,7 +340,7 @@ if (process.env.SHARELATEX_HEADER_EXTRAS != null) {
// -------------
//
// You must configure a mail server to be able to send invite emails from
// ShareLaTeX. The config settings are passed to nodemailer. See the nodemailer
// Overleaf Community Edition. The config settings are passed to nodemailer. See the nodemailer
// documentation for available options:
//
// http://www.nodemailer.com/docs/transports
@ -418,7 +420,7 @@ if (
}
// ######################
// ShareLaTeX Server Pro
// Overleaf Server Pro
// ######################
if (parse(process.env.SHARELATEX_IS_SERVER_PRO) === true) {
@ -503,7 +505,7 @@ switch (process.env.SHARELATEX_FILESTORE_BACKEND) {
stores: {
user_files: process.env.SHARELATEX_FILESTORE_USER_FILES_BUCKET_NAME,
template_files:
process.env.SHARELATEX_FILESTORE_TEMPLATE_FILES_BUCKET_NAME,
process.env.SHARELATEX_FILESTORE_TEMPLATE_FILES_BUCKET_NAME,
},
s3: {
key:

View file

@ -1,6 +1,6 @@
FROM sharelatex/sharelatex:3.5.5
# Patch: support trustProxyIps in Server CE/Pro
# Patch: support trustProxyIps in Overleaf Community Edition/Server Pro
COPY trusted_proxy_ips.patch .
RUN patch -p0 --directory=/etc/sharelatex < trusted_proxy_ips.patch

View file

@ -1,7 +1,7 @@
overleaf/chat
===============
The backend API that powers the chat service in ShareLaTeX
The backend API that powers the chat service in Overleaf
License
-------

View file

@ -11,7 +11,7 @@ module.exports = {
url: `http://${process.env.WEB_HOST || 'localhost'}:${
process.env.WEB_PORT || 3000
}`,
user: process.env.WEB_API_USER || 'sharelatex',
user: process.env.WEB_API_USER || 'overleaf',
pass: process.env.WEB_API_PASSWORD || 'password',
},
},

View file

@ -100,14 +100,14 @@ sudo chmod -R g+w compiles
sudo chmod g+s compiles
```
Another solution is to create a `sharelatex` group and add both `root` and the user with `uid` `1000` to it. If the host does not have a user with that `uid`, you will need to create one first.
Another solution is to create a `overleaf` group and add both `root` and the user with `uid` `1000` to it. If the host does not have a user with that `uid`, you will need to create one first.
```shell
sudo useradd --uid 1000 host-node-user # If required
sudo groupadd sharelatex
sudo usermod -a -G sharelatex root
sudo usermod -a -G sharelatex $(id -nu 1000)
sudo chown -R 1000:sharelatex compiles
sudo groupadd overleaf
sudo usermod -a -G overleaf root
sudo usermod -a -G overleaf $(id -nu 1000)
sudo chown -R 1000:overleaf compiles
sudo chmod -R g+w compiles
sudo chmod g+s compiles
```

View file

@ -6,7 +6,7 @@ services:
ALLOWED_IMAGES: "quay.io/sharelatex/texlive-full:2017.1"
TEXLIVE_IMAGE: quay.io/sharelatex/texlive-full:2017.1
TEXLIVE_IMAGE_USER: "tex"
SHARELATEX_CONFIG: /overleaf/services/clsi/config/settings.defaults.js
OVERLEAF_CONFIG: /overleaf/services/clsi/config/settings.defaults.js
DOCKER_RUNNER: "true"
COMPILES_HOST_DIR: $PWD/compiles
volumes:
@ -20,7 +20,7 @@ services:
ALLOWED_IMAGES: ${TEXLIVE_IMAGE}
TEXLIVE_IMAGE: quay.io/sharelatex/texlive-full:2017.1
TEXLIVE_IMAGE_USER: "tex"
SHARELATEX_CONFIG: /overleaf/services/clsi/config/settings.defaults.js
OVERLEAF_CONFIG: /overleaf/services/clsi/config/settings.defaults.js
DOCKER_RUNNER: "true"
COMPILES_HOST_DIR: $PWD/compiles
volumes:

View file

@ -72,7 +72,7 @@ describe('DockerRunner', function () {
this.directory = '/local/compile/directory'
this.mainFile = 'main-file.tex'
this.compiler = 'pdflatex'
this.image = 'example.com/sharelatex/image:2016.2'
this.image = 'example.com/overleaf/image:2016.2'
this.env = {}
this.callback = sinon.stub()
this.project_id = 'project-id-123'
@ -154,7 +154,7 @@ describe('DockerRunner', function () {
describe('when path.sandboxedCompilesHostDir is set', function () {
beforeEach(function () {
this.Settings.path.sandboxedCompilesHostDir = '/some/host/dir/compiles'
this.directory = '/var/lib/sharelatex/data/compiles/xyz'
this.directory = '/var/lib/overleaf/data/compiles/xyz'
this.DockerRunner._runAndWaitForContainer = sinon
.stub()
.callsArgWith(3, null, (this.output = 'mock-output'))

View file

@ -11,7 +11,7 @@ module.exports = {
url: `http://${
process.env.WEB_API_HOST || process.env.WEB_HOST || 'localhost'
}:${process.env.WEB_API_PORT || process.env.WEB_PORT || 3000}`,
user: process.env.WEB_API_USER || 'sharelatex',
user: process.env.WEB_API_USER || 'overleaf',
pass: process.env.WEB_API_PASSWORD || 'password',
},
project_history: {

View file

@ -35,7 +35,7 @@ describe('PersistenceManager', function () {
this.Settings.apis = {
web: {
url: (this.url = 'www.example.com'),
user: (this.user = 'sharelatex'),
user: (this.user = 'overleaf'),
pass: (this.pass = 'password'),
},
}

View file

@ -11,8 +11,8 @@ filestore acts as a proxy between the CLSIs and (currently) Amazon S3 storage, p
* `/project/:project_id/size`
* `/bucket/:bucket/key/*`
* `/shutdown`
* `/status` - returns `filestore sharelatex up` or `server is being shut down` (HTTP 500)
* `/health_check`
* `/status` - returns HTTP 200 `filestore is up` or HTTP 503 when shutting down
* `/health_check`
License
-------

View file

@ -1,5 +1,5 @@
{
"databaseUrl": "postgres://sharelatex:sharelatex@postgres/sharelatex",
"databaseUrl": "postgres://overleaf:overleaf@postgres/overleaf-history-v1-test",
"persistor": {
"backend": "gcs",
"gcs": {

View file

@ -58,8 +58,9 @@ services:
postgres:
image: postgres:10
environment:
POSTGRES_USER: sharelatex
POSTGRES_PASSWORD: sharelatex
POSTGRES_USER: overleaf
POSTGRES_PASSWORD: overleaf
POSTGRES_DB: overleaf-history-v1-test
healthcheck:
test: pg_isready --quiet
interval: 1s

View file

@ -61,8 +61,9 @@ services:
postgres:
image: postgres:10
environment:
POSTGRES_USER: sharelatex
POSTGRES_PASSWORD: sharelatex
POSTGRES_USER: overleaf
POSTGRES_PASSWORD: overleaf
POSTGRES_DB: overleaf-history-v1-test
healthcheck:
test: pg_isready --host=localhost --quiet
interval: 1s

View file

@ -4,7 +4,7 @@ require('@overleaf/metrics/initialize')
const metrics = require('@overleaf/metrics')
const Settings = require('@overleaf/settings')
const logger = require('@overleaf/logger')
logger.initialize('notifications-sharelatex')
logger.initialize('notifications')
const express = require('express')
const app = express()
const methodOverride = require('method-override')
@ -34,7 +34,7 @@ app.delete('/key/:key', controller.removeNotificationByKeyOnly)
app.get('/key/:key/count', controller.countNotificationsByKeyOnly)
app.delete('/key/:key/bulk', controller.deleteUnreadNotificationsByKeyOnlyBulk)
app.get('/status', (req, res) => res.send('notifications sharelatex up'))
app.get('/status', (req, res) => res.send('notifications is up'))
app.get('/health_check', (req, res) =>
HealthCheckController.check(function (err) {

View file

@ -142,10 +142,10 @@ export function _convertPathname(pathname) {
// workaround for filenames containing asterisks, this will
// fail if a corresponding replacement file already exists but it
// would fail anyway without this attempt to fix the pathname.
// See https://github.com/overleaf/sharelatex/issues/900
// See https://github.com/overleaf/internal/issues/900
pathname = pathname.replace(/\*/g, '__ASTERISK__')
// workaround for filenames beginning with spaces
// See https://github.com/overleaf/sharelatex/issues/1404
// See https://github.com/overleaf/internal/issues/1404
// note: we have already stripped any leading slash above
pathname = pathname.replace(/^ /, '__SPACE__') // handle top-level
pathname = pathname.replace(/\/ /g, '/__SPACE__') // handle folders

View file

@ -27,7 +27,7 @@ module.exports = {
url: `http://${
process.env.WEB_API_HOST || process.env.WEB_HOST || 'localhost'
}:${process.env.WEB_PORT || 3000}`,
user: process.env.WEB_API_USER || 'sharelatex',
user: process.env.WEB_API_USER || 'overleaf',
pass: process.env.WEB_API_PASSWORD || 'password',
historyIdCacheSize: parseInt(
process.env.HISTORY_ID_CACHE_SIZE || '10000',

View file

@ -232,7 +232,7 @@ async function main() {
'number of queues with project structure version out of order on incoming updates=',
results.length
)
// now clear the sharelatex projects
// now clear the projects
async.eachSeries(results.slice(0, limit), checkAndClear, err => {
console.log('Final error status', err)
console.log(

View file

@ -15,13 +15,13 @@ describe('HistoryStoreManager', function () {
overleaf: {
history: {
host: 'http://example.com',
user: 'sharelatex',
user: 'overleaf',
pass: 'password',
},
},
apis: {
filestore: {
url: 'http://filestore.sharelatex.production',
url: 'http://filestore.overleaf.production',
},
history_v1: { requestTimeout: 123 },
},

View file

@ -12,7 +12,7 @@ describe('WebApiManager', function () {
apis: {
web: {
url: 'http://example.com',
user: 'sharelatex',
user: 'overleaf',
pass: 'password',
},
},

View file

@ -2,7 +2,7 @@ let HttpController
module.exports = HttpController = {
// The code in this controller is hard to unit test because of a lot of
// dependencies on internal socket.io methods. It is not critical to the running
// of ShareLaTeX, and is only used for getting stats about connected clients,
// of Overleaf, and is only used for getting stats about connected clients,
// and for checking internal state in acceptance tests. The acceptances tests
// should provide appropriate coverage.
_getConnectedClientView(ioClient) {

View file

@ -92,7 +92,7 @@ const settings = {
url: `http://${
process.env.WEB_API_HOST || process.env.WEB_HOST || 'localhost'
}:${process.env.WEB_API_PORT || process.env.WEB_PORT || 3000}`,
user: process.env.WEB_API_USER || 'sharelatex',
user: process.env.WEB_API_USER || 'overleaf',
pass: process.env.WEB_API_PASSWORD || 'password',
},
documentupdater: {
@ -108,7 +108,7 @@ const settings = {
sessionSecret: process.env.SESSION_SECRET || 'secret-please-change',
},
cookieName: process.env.COOKIE_NAME || 'sharelatex.sid',
cookieName: process.env.COOKIE_NAME || 'overleaf.sid',
// Expose the hostname in the `debug.getHostname` rpc
exposeHostname: process.env.EXPOSE_HOSTNAME === 'true',

View file

@ -28,7 +28,7 @@ describe('SpellingAPIManager', function () {
}
this.SpellingAPIManager = await esmock(MODULE_PATH, {
'../../../app/js/ASpell.js': this.ASpell,
'@overleaf/settings': { ignoredMisspellings: ['ShareLaTeX'] },
'@overleaf/settings': { ignoredMisspellings: ['Overleaf'] },
})
})

View file

@ -4,7 +4,7 @@ import path from 'node:path'
const rootDir = path.resolve(__dirname, '..')
// NOTE: must be set before webpack config is imported
process.env.SHARELATEX_CONFIG = path.join(rootDir, 'config/settings.webpack.js')
process.env.OVERLEAF_CONFIG = path.join(rootDir, 'config/settings.webpack.js')
const config: StorybookConfig = {
core: {

View file

@ -5,8 +5,8 @@ BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
PROJECT_NAME = web
BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]')
export SHARELATEX_CONFIG ?= /overleaf/services/web/test/acceptance/config/settings.test.saas.js
export BASE_CONFIG ?= ${SHARELATEX_CONFIG}
export OVERLEAF_CONFIG ?= /overleaf/services/web/test/acceptance/config/settings.test.saas.js
export BASE_CONFIG ?= ${OVERLEAF_CONFIG}
CFG_SAAS=/overleaf/services/web/test/acceptance/config/settings.test.saas.js
CFG_SERVER_CE=/overleaf/services/web/test/acceptance/config/settings.test.server-ce.js
@ -179,11 +179,11 @@ TEST_ACCEPTANCE_APP := \
test_acceptance_app: $(TEST_ACCEPTANCE_APP)
test_acceptance_app_saas: export COMPOSE_PROJECT_NAME=acceptance_test_saas_$(BUILD_DIR_NAME)
test_acceptance_app_saas: export SHARELATEX_CONFIG=$(CFG_SAAS)
test_acceptance_app_saas: export OVERLEAF_CONFIG=$(CFG_SAAS)
test_acceptance_app_server_ce: export COMPOSE_PROJECT_NAME=acceptance_test_server_ce_$(BUILD_DIR_NAME)
test_acceptance_app_server_ce: export SHARELATEX_CONFIG=$(CFG_SERVER_CE)
test_acceptance_app_server_ce: export OVERLEAF_CONFIG=$(CFG_SERVER_CE)
test_acceptance_app_server_pro: export COMPOSE_PROJECT_NAME=acceptance_test_server_pro_$(BUILD_DIR_NAME)
test_acceptance_app_server_pro: export SHARELATEX_CONFIG=$(CFG_SERVER_PRO)
test_acceptance_app_server_pro: export OVERLEAF_CONFIG=$(CFG_SERVER_PRO)
$(TEST_ACCEPTANCE_APP):
$(DOCKER_COMPOSE) down -v -t 0
@ -197,8 +197,8 @@ $(TEST_ACCEPTANCE_APP):
# add a dependency on each modules Makefile and cross-link that to the
# template at the very top of this file.
# Example: `web$ make modules/server-ce-scripts/test_acceptance_server_ce`
# Description: Run the acceptance tests of the server-ce-scripts module in a
# Server CE Environment.
# Description: Run the acceptance tests of the server-ce-scripts module in an
# Overleaf Community Edition Environment.
# Break down:
# Target: modules/server-ce-scripts/test_acceptance_server_ce
# -> depends on modules/server-ce-scripts/Makefile
@ -261,7 +261,7 @@ test_acceptance_module_maybe_in_server_pro: export BASE_CONFIG=$(CFG_SERVER_PRO)
# service would start mongo/redis.
$(TEST_ACCEPTANCE_MODULE_MAYBE_IN): test_acceptance_module_maybe_in_%:
$(MAKE) $(shell \
SHARELATEX_CONFIG=$(BASE_CONFIG) \
OVERLEAF_CONFIG=$(BASE_CONFIG) \
$(DOCKER_COMPOSE) run --rm test_unit \
node test/acceptance/getModuleTargets test_acceptance_$* \
| grep -e /$(MODULE_NAME)/ || echo test_acceptance_module_noop LABEL=$* \
@ -285,7 +285,7 @@ TEST_ACCEPTANCE_MODULES_MERGED_INNER = $(MODULE_DIRS:=/test_acceptance_merged_in
$(TEST_ACCEPTANCE_MODULES_MERGED_INNER): %/test_acceptance_merged_inner: %/Makefile
test_acceptance_modules_merged_inner:
$(MAKE) $(shell \
SHARELATEX_CONFIG=$(BASE_CONFIG) \
OVERLEAF_CONFIG=$(BASE_CONFIG) \
node test/acceptance/getModuleTargets test_acceptance_merged_inner \
)
@ -308,7 +308,7 @@ TEST_ACCEPTANCE_MODULES_MERGED_INNER_SPLIT = \
# Finally we check with grep for any targets in a batch and print a fallback if none were found.
$(TEST_ACCEPTANCE_MODULES_MERGED_INNER_SPLIT):
$(MAKE) $(shell \
SHARELATEX_CONFIG=$(BASE_CONFIG) \
OVERLEAF_CONFIG=$(BASE_CONFIG) \
node test/acceptance/getModuleTargets test_acceptance_merged_inner \
| tail -n+$(START) | head -n 10 \
| grep -e . || echo no_more_targets \

View file

@ -3,7 +3,7 @@ MODULE_NAME := $(notdir $(shell pwd))
MODULE_DIR := modules/$(MODULE_NAME)
PROJECT_NAME = web
export SHARELATEX_CONFIG = /overleaf/services/web/$(MODULE_DIR)/test/acceptance/config/settings.test.js
export OVERLEAF_CONFIG = /overleaf/services/web/$(MODULE_DIR)/test/acceptance/config/settings.test.js
export BASE_CONFIG ?= /overleaf/services/web/test/acceptance/config/settings.test.saas.js
CFG_SAAS=/overleaf/services/web/test/acceptance/config/settings.test.saas.js

View file

@ -143,7 +143,7 @@ async function deleteEntity(params) {
}
async function createProject(params) {
if (!tpdsUrl) return // Server CE/Pro
if (!tpdsUrl) return // Overleaf Community Edition/Server Pro
const { projectId, projectName, ownerId, userId } = params

View file

@ -97,7 +97,7 @@ async function dropTestDatabase() {
const dbName = internalDb.databaseName
const env = process.env.NODE_ENV
if (dbName !== 'test-sharelatex' || env !== 'test') {
if (dbName !== 'test-overleaf' || env !== 'test') {
throw new OError(
`Refusing to clear database '${dbName}' in environment '${env}'`
)

View file

@ -1192,11 +1192,11 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
} else if (!Settings.editorIsOpen) {
plainTextResponse(res, 'web editor is closed (web)')
} else {
plainTextResponse(res, 'web sharelatex is alive (web)')
plainTextResponse(res, 'web is alive (web)')
}
})
privateApiRouter.get('/status', (req, res) => {
plainTextResponse(res, 'web sharelatex is alive (api)')
plainTextResponse(res, 'web is alive (api)')
})
// used by kubernetes health-check and acceptance tests

View file

@ -37,7 +37,7 @@ else if (settings.overleaf)
meta(itemprop="image", content=buildImgPath('ol-brand/overleaf_og_logo.png'))
meta(name="image", content=buildImgPath('ol-brand/overleaf_og_logo.png'))
else
//- the default image for ShareLaTeX
//- the default image for Overleaf Community Edition/Server Pro
meta(itemprop="image", content='/touch-icon-192x192.png')
meta(name="image", content='/touch-icon-192x192.png')
@ -67,7 +67,7 @@ else if (settings.overleaf)
//- the default image for Overleaf
meta(name="twitter:image", content=buildImgPath('ol-brand/overleaf_og_logo.png'))
else
//- the default image for ShareLaTeX
//- the default image for Overleaf Community Edition/Server Pro
meta(name="twitter:image", content='/touch-icon-192x192.png')
//- Open Graph
@ -87,7 +87,7 @@ else if (settings.overleaf)
//- the default image for Overleaf
meta(property="og:image", content=buildImgPath('ol-brand/overleaf_og_logo.png'))
else
//- the default image for ShareLaTeX
//- the default image for Overleaf Community Edition/Server Pro
meta(property="og:image", content='/touch-icon-192x192.png')
if (metadata && metadata.openGraphType)

View file

@ -1,11 +0,0 @@
extends ../layout-marketing
block content
main.content.content-alt#main-content
.container
.row
.col-md-6.col-md-offset-3
.card
.page-header
h1 Account Access Error
p.text-danger Sorry, an error occurred accessing your account. Please #[a(href="" data-ol-open-contact-form-modal="contact-us") contact support] and provide any email addresses that you have used to sign in to Overleaf and/or ShareLaTeX for assistance.

View file

@ -39,9 +39,6 @@ html(
meta(name="ol-baseAssetPath" content=buildBaseAssetPath())
meta(name="ol-usersEmail" content=getUserEmail())
meta(name="ol-sharelatex" data-type="json" content={
siteUrl: settings.siteUrl,
})
meta(name="ol-ab" data-type="json" content={})
meta(name="ol-user_id" content=getLoggedInUserId())
//- Internationalisation settings
@ -60,13 +57,6 @@ html(
indexes: settings.algolia.indexes
})
if (typeof(settings.templates) != "undefined")
meta(name="ol-sharelatex.templates" data-type="json" content={
user_id : settings.templates.user_id,
cdnDomain : settings.templates.cdnDomain,
indexName : settings.templates.indexName
})
meta(name="ol-isManagedAccount" data-type="boolean" content=isManagedAccount)
each restriction in userRestrictions || []
meta(name='ol-cannot-' + restriction data-type="boolean" content=true)

View file

@ -287,7 +287,7 @@ module.exports = {
splitTests: [],
// Where your instance of ShareLaTeX can be found publically. Used in emails
// Where your instance of Overleaf Community Edition/Server Pro can be found publicly. Used in emails
// that are sent out, generated links, etc.
siteUrl: (siteUrl = process.env.PUBLIC_URL || 'http://localhost:3000'),
@ -317,7 +317,7 @@ module.exports = {
// use full domain for cookies to only be accessible from that domain,
// replace subdomain with dot to have them accessible on all subdomains
cookieDomain: process.env.COOKIE_DOMAIN,
cookieName: process.env.COOKIE_NAME || 'sharelatex.sid',
cookieName: process.env.COOKIE_NAME || 'overleaf.sid',
cookieRollingSession: true,
// this is only used if cookies are used for clsi backend
@ -526,7 +526,7 @@ module.exports = {
// Email support
// -------------
//
// ShareLaTeX uses nodemailer (http://www.nodemailer.com/) to send transactional emails.
// Overleaf uses nodemailer (http://www.nodemailer.com/) to send transactional emails.
// To see the range of transport and options they support, see http://www.nodemailer.com/docs/transports
// email:
// fromAddress: ""
@ -556,7 +556,7 @@ module.exports = {
// them.
cacheStaticAssets: false,
// If you are running ShareLaTeX over https, set this to true to send the
// If you are running Overleaf over https, set this to true to send the
// cookie with a secure flag (recommended).
secureCookie: false,
@ -565,7 +565,7 @@ module.exports = {
// https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7
sameSiteCookie: 'lax',
// If you are running ShareLaTeX behind a proxy (like Apache, Nginx, etc)
// If you are running Overleaf behind a proxy (like Apache, Nginx, etc)
// then set this to true to allow it to correctly detect the forwarded IP
// address and http/https protocol information.
behindProxy: false,

View file

@ -15,7 +15,7 @@ services:
working_dir: /overleaf/services/web
environment:
BASE_CONFIG:
SHARELATEX_CONFIG:
OVERLEAF_CONFIG:
NODE_OPTIONS: "--unhandled-rejections=strict"
test_acceptance:
@ -27,7 +27,7 @@ services:
env_file: docker-compose.common.env
environment:
BASE_CONFIG:
SHARELATEX_CONFIG:
OVERLEAF_CONFIG:
extra_hosts:
- 'www.overleaf.test:127.0.0.1'
command: npm run test:acceptance:app
@ -97,5 +97,5 @@ services:
image: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/saml-test
environment:
SAML_BASE_URL_PATH: 'http://saml/simplesaml/'
SAML_TEST_SP_ENTITY_ID: 'sharelatex-test-saml'
SAML_TEST_SP_ENTITY_ID: 'overleaf-test-saml'
SAML_TEST_SP_LOCATION: 'http://www.overleaf.test:23000/saml/callback'

View file

@ -4,7 +4,7 @@ WEB_PORT=23000
REDIS_HOST=redis
QUEUES_REDIS_HOST=redis
ANALYTICS_QUEUES_REDIS_HOST=redis
MONGO_URL=mongodb://mongo/test-sharelatex
MONGO_URL=mongodb://mongo/test-overleaf
SHARELATEX_ALLOW_PUBLIC_ACCESS=true
LINKED_URL_PROXY=http://localhost:6543
ENABLED_LINKED_FILE_TYPES=url,project_file,project_output_file,mendeley,zotero
@ -31,7 +31,7 @@ SHARELATEX_LDAP_UPDATE_USER_DETAILS_ON_LOGIN=true
# Server-Pro SAML
SHARELATEX_SAML_ENTRYPOINT=http://saml/simplesaml/saml2/idp/SSOService.php
SHARELATEX_SAML_CALLBACK_URL=http://saml/saml/callback
SHARELATEX_SAML_ISSUER=sharelatex-test-saml
SHARELATEX_SAML_ISSUER=overleaf-test-saml
SHARELATEX_SAML_IDENTITY_SERVICE_NAME="SAML Test Server"
SHARELATEX_SAML_EMAIL_FIELD=email
SHARELATEX_SAML_FIRST_NAME_FIELD=givenName

View file

@ -14,7 +14,7 @@ services:
working_dir: /overleaf/services/web
environment:
BASE_CONFIG:
SHARELATEX_CONFIG:
OVERLEAF_CONFIG:
MOCHA_GREP: ${MOCHA_GREP}
NODE_OPTIONS: "--unhandled-rejections=strict"
command: npm run --silent test:unit:app
@ -31,7 +31,7 @@ services:
env_file: docker-compose.common.env
environment:
BASE_CONFIG:
SHARELATEX_CONFIG:
OVERLEAF_CONFIG:
MOCHA_GREP: ${MOCHA_GREP}
MONGO_SERVER_SELECTION_TIMEOUT: 600000
MONGO_SOCKET_TIMEOUT: 300000
@ -96,5 +96,5 @@ services:
image: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/saml-test
environment:
SAML_BASE_URL_PATH: 'http://saml/simplesaml/'
SAML_TEST_SP_ENTITY_ID: 'sharelatex-test-saml'
SAML_TEST_SP_ENTITY_ID: 'overleaf-test-saml'
SAML_TEST_SP_LOCATION: 'http://www.overleaf.test:23000/saml/callback'

View file

@ -25,7 +25,7 @@ import getMeta from './utils/meta'
import { configureMathJax } from './features/mathjax/configure'
const App = angular
.module('SharelatexApp', [
.module('OverleafApp', [
'ui.bootstrap',
'RecursionHelper',
'ngSanitize',

View file

@ -397,7 +397,7 @@ If the project has been renamed please look in your project list for a new proje
cleanupServiceWorker()
angular.module('SharelatexApp').config([
angular.module('OverleafApp').config([
'$provide',
function ($provide) {
$provide.decorator('$browser', [
@ -413,7 +413,7 @@ angular.module('SharelatexApp').config([
},
])
export default angular.bootstrap(document.body, ['SharelatexApp'])
export default angular.bootstrap(document.body, ['OverleafApp'])
function __guard__(value, transform) {
return typeof value !== 'undefined' && value !== null

View file

@ -260,7 +260,7 @@ const hints = {
<>
The compiler cannot find the file you want to include. Make sure that
you have{' '}
<WikiLink url="https://www.overleaf.com/learn/Including_images_in_ShareLaTeX">
<WikiLink url="https://www.overleaf.com/learn/how-to/Including_images_on_Overleaf">
uploaded the file
</WikiLink>{' '}
and{' '}

View file

@ -19,7 +19,7 @@ import './features/cookie-banner'
import '../../modules/modules-main'
import './cdn-load-test' // TODO: remove this?
import { debugConsole } from '@/utils/debugging'
angular.module('SharelatexApp').config([
angular.module('OverleafApp').config([
'$locationProvider',
function ($locationProvider) {
try {
@ -33,4 +33,4 @@ angular.module('SharelatexApp').config([
}
},
])
export default angular.bootstrap(document.body, ['SharelatexApp'])
export default angular.bootstrap(document.body, ['OverleafApp'])

View file

@ -83,7 +83,7 @@
}
.caption {
// Override ShareLatex template styles
// Override Server Pro template styles
background: none;
border: none;
text-align: center;

View file

@ -94,7 +94,7 @@
// ngTagsInput
@import 'components/tags-input.less';
// ShareLaTeX app classes
// Overleaf app classes
@import 'app/base.less';
@import 'app/account-settings.less';
@import 'app/beta-program.less';

View file

@ -1,5 +1,5 @@
#!/bin/bash
SHARELATEX_CONFIG=/overleaf/services/web/config/settings.webpack.js npm run webpack:production & WEBPACK=$!
OVERLEAF_CONFIG=/overleaf/services/web/config/settings.webpack.js npm run webpack:production & WEBPACK=$!
wait $WEBPACK && echo "Webpack complete" || exit 1

View file

@ -15,7 +15,7 @@ COOKIE_DOMAIN=.dev-overleaf.com
PUBLIC_URL=https://www.dev-overleaf.com
CURRENT_IMAGE_NAME=texlive-full:2021.1
LINKED_URL_PROXY=http://127.0.0.1:8081/proxy/secret-proxy-token
SHARELATEX_CONFIG=$(pwd)/../../config/settings.web.js
OVERLEAF_CONFIG=$(pwd)/../../config/settings.web.js
ENABLE_PDF_CACHING=true
HAVE_I_BEEN_PWNED_ENABLED=true
NODE_ENV=development

View file

@ -7,7 +7,7 @@ PUBSUB_REDIS_HOST=127.0.0.1
RATELIMITER_REDIS_HOST=127.0.0.1
GCLOUD_2_REDIS_HOST=127.0.0.1
POSTGRES_HOST=127.0.0.1
MONGO_URL=mongodb://127.0.0.1/test-sharelatex?directConnection=true
MONGO_URL=mongodb://127.0.0.1/test-overleaf?directConnection=true
SHARELATEX_LDAP_URL=ldap://127.0.0.1:22389
SAML_BASE_URL_PATH=http://127.0.0.1:22280/simplesaml/
SHARELATEX_SAML_ENTRYPOINT=http://127.0.0.1:22280/simplesaml/saml2/idp/SSOService.php

View file

@ -30,8 +30,8 @@
"extract-translations": "i18next-scanner",
"migrations": "MONGO_SOCKET_TIMEOUT=0 east",
"convert-themes": "node frontend/js/features/source-editor/themes/scripts/convert.js",
"cypress:open-ct": "SHARELATEX_CONFIG=$PWD/config/settings.webpack.js cypress open --component",
"cypress:run-ct": "SHARELATEX_CONFIG=$PWD/config/settings.webpack.js cypress run --component --browser chrome",
"cypress:open-ct": "OVERLEAF_CONFIG=$PWD/config/settings.webpack.js cypress open --component",
"cypress:run-ct": "OVERLEAF_CONFIG=$PWD/config/settings.webpack.js cypress run --component --browser chrome",
"cypress:docker:open-ct": "DOCKER_USER=\"$(id -u):$(id -g)\" docker compose -f docker-compose.cypress.yml run --rm cypress run cypress:open-ct",
"cypress:docker:run-ct": "DOCKER_USER=\"$(id -u):$(id -g)\" docker compose -f docker-compose.cypress.yml run --rm cypress run cypress:run-ct --browser chrome",
"lezer-latex:generate": "node scripts/lezer-latex/generate.js",
@ -41,12 +41,12 @@
"routes": "bin/routes",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"local:nodemon": "set -a;. ../../config/dev-environment.env;. ./docker-compose.common.env;. ../../config/local-dev.env;. ./local-dev.env;. ../../config/local.env; set +a; echo $SHARELATEX_CONFIG; WEB_PORT=13000 LISTEN_ADDRESS=0.0.0.0 npm run nodemon",
"local:webpack": "set -a;. ../../config/dev-environment.env;. ./docker-compose.common.env;. ../../config/local-dev.env;. ./local-dev.env;. ../../config/local.env; set +a; PORT=13808 SHARELATEX_CONFIG=$(pwd)/config/settings.webpack.js npm run webpack",
"local:nodemon": "set -a;. ../../config/dev-environment.env;. ./docker-compose.common.env;. ../../config/local-dev.env;. ./local-dev.env;. ../../config/local.env; set +a; echo $OVERLEAF_CONFIG; WEB_PORT=13000 LISTEN_ADDRESS=0.0.0.0 npm run nodemon",
"local:webpack": "set -a;. ../../config/dev-environment.env;. ./docker-compose.common.env;. ../../config/local-dev.env;. ./local-dev.env;. ../../config/local.env; set +a; PORT=13808 OVERLEAF_CONFIG=$(pwd)/config/settings.webpack.js npm run webpack",
"local:test:acceptance:run_dir": "set -a;. $(pwd)/docker-compose.common.env;. $(pwd)/local-test.env; set +a; npm run test:acceptance:run_dir",
"local:test:acceptance:run_app": "SHARELATEX_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js npm run local:test:acceptance:run_dir -- $(pwd)/test/acceptance/src",
"local:test:acceptance:run_module": "if [ ! -d $(pwd)/modules/${MODULE}/test/acceptance ]; then echo \"Module '${MODULE}' does not have acceptance tests\"; exit 0; fi; SHARELATEX_CONFIG=$(pwd)/modules/${MODULE}/test/acceptance/config/settings.test.js BASE_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js npm run local:test:acceptance:run_dir -- $(pwd)/modules/${MODULE}/test/acceptance",
"local:test:acceptance:run_modules": "SHARELATEX_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js node $(pwd)/test/acceptance/getModuleTargets --name-only | xargs -n1 sh -c 'MODULE=$0 npm run local:test:acceptance:run_module || exit 255' $1",
"local:test:acceptance:run_app": "OVERLEAF_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js npm run local:test:acceptance:run_dir -- $(pwd)/test/acceptance/src",
"local:test:acceptance:run_module": "if [ ! -d $(pwd)/modules/${MODULE}/test/acceptance ]; then echo \"Module '${MODULE}' does not have acceptance tests\"; exit 0; fi; OVERLEAF_CONFIG=$(pwd)/modules/${MODULE}/test/acceptance/config/settings.test.js BASE_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js npm run local:test:acceptance:run_dir -- $(pwd)/modules/${MODULE}/test/acceptance",
"local:test:acceptance:run_modules": "OVERLEAF_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js node $(pwd)/test/acceptance/getModuleTargets --name-only | xargs -n1 sh -c 'MODULE=$0 npm run local:test:acceptance:run_module || exit 255' $1",
"local:test:acceptance:app:saas": "OVERLEAF_APP=saas npm run local:test:acceptance:run_app",
"local:test:acceptance:app:server-pro": "OVERLEAF_APP=server-pro npm run local:test:acceptance:run_app",
"local:test:acceptance:app:server-ce": "OVERLEAF_APP=server-ce npm run local:test:acceptance:run_app",

View file

@ -2,7 +2,7 @@ const { merge } = require('@overleaf/settings/merge')
let features
const httpAuthUser = 'sharelatex'
const httpAuthUser = 'overleaf'
const httpAuthPass = 'password'
const httpAuthUsers = {}
httpAuthUsers[httpAuthUser] = httpAuthPass

View file

@ -2,7 +2,7 @@ const { merge } = require('@overleaf/settings/merge')
const baseApp = require('../../../config/settings.overrides.saas')
const baseTest = require('./settings.test.defaults')
const httpAuthUser = 'sharelatex'
const httpAuthUser = 'overleaf'
const httpAuthPass = 'password'
const httpAuthUsers = {}
httpAuthUsers[httpAuthUser] = httpAuthPass

View file

@ -15,7 +15,7 @@ const { expect } = require('chai')
const request = require('./helpers/request')
const Settings = require('@overleaf/settings')
const auth = Buffer.from('sharelatex:password').toString('base64')
const auth = Buffer.from('overleaf:password').toString('base64')
const authedRequest = request.defaults({
headers: {
Authorization: `Basic ${auth}`,

View file

@ -13,7 +13,7 @@ describe('PrimaryEmailCheck', function () {
)
})
describe('redirections in Server CE/Pro', function () {
describe('redirections in Overleaf Community Edition/Server Pro', function () {
before(async function () {
if (Features.hasFeature('saas')) {
this.skip()

View file

@ -133,7 +133,7 @@ describe('Tags', function () {
})
describe('get tags via api', function () {
const auth = Buffer.from('sharelatex:password').toString('base64')
const auth = Buffer.from('overleaf:password').toString('base64')
const authedRequest = request.defaults({
headers: {
Authorization: `Basic ${auth}`,

View file

@ -31,7 +31,7 @@ describe('TpdsUpdateTests', function () {
method: 'POST',
url: `/project/${this.projectId}/contents/test.tex`,
auth: {
username: 'sharelatex',
username: 'overleaf',
password: 'password',
sendImmediately: true,
},
@ -67,7 +67,7 @@ describe('TpdsUpdateTests', function () {
method: 'DELETE',
url: `/project/${this.projectId}/contents/main.tex`,
auth: {
username: 'sharelatex',
username: 'overleaf',
password: 'password',
sendImmediately: true,
},
@ -105,7 +105,7 @@ describe('TpdsUpdateTests', function () {
method: 'POST',
url: `/user/${this.owner._id}/update/test-project/other.tex`,
auth: {
username: 'sharelatex',
username: 'overleaf',
password: 'password',
sendImmediately: true,
},
@ -153,7 +153,7 @@ describe('TpdsUpdateTests', function () {
method: 'POST',
url: `/user/${this.owner._id}/update/test-project/test.tex`,
auth: {
username: 'sharelatex',
username: 'overleaf',
password: 'password',
sendImmediately: true,
},

View file

@ -12,7 +12,7 @@ require('jsdom-global')(undefined, {
})
const path = require('path')
process.env.SHARELATEX_CONFIG = path.resolve(
process.env.OVERLEAF_CONFIG = path.resolve(
__dirname,
'../../config/settings.webpack.js'
)

View file

@ -220,42 +220,42 @@ describe('LatexLinter', function () {
it('should accept \\url|...|', function () {
const { errors } = Parse(
'this is text \\url|http://www.sharelatex.com/| and more\n'
'this is text \\url|http://www.overleaf.com/| and more\n'
)
assert.equal(errors.length, 0)
})
it('should accept \\url{...}', function () {
const { errors } = Parse(
'this is text \\url{http://www.sharelatex.com/} and more\n'
'this is text \\url{http://www.overleaf.com/} and more\n'
)
assert.equal(errors.length, 0)
})
it('should accept \\url{...} with % chars', function () {
const { errors } = Parse(
'this is text \\url{http://www.sharelatex.com/hello%20world} and more\n'
'this is text \\url{http://www.overleaf.com/hello%20world} and more\n'
)
assert.equal(errors.length, 0)
})
it('should accept \\href{...}{...}', function () {
const { errors } = Parse(
'this is text \\href{http://www.sharelatex.com/}{test} and more\n'
'this is text \\href{http://www.overleaf.com/}{test} and more\n'
)
assert.equal(errors.length, 0)
})
it('should accept \\href{...}{...} with dollarsign in url', function () {
const { errors } = Parse(
'this is text \\href{http://www.sharelatex.com/foo=$bar}{test} and more\n'
'this is text \\href{http://www.overleaf.com/foo=$bar}{test} and more\n'
)
assert.equal(errors.length, 0)
})
it('should not accept \\href|...|{...}', function () {
const { errors } = Parse(
'this is text \\href|http://www.sharelatex.com|{test} and more\n'
'this is text \\href|http://www.overleaf.com|{test} and more\n'
)
assert.equal(errors.length, 1)
assert.equal(errors[0].text, 'invalid href command')
@ -264,7 +264,7 @@ describe('LatexLinter', function () {
it('should catch error in text argument of \\href{...}{...}', function () {
const { errors } = Parse(
'this is text \\href{http://www.sharelatex.com/foo=$bar}{i have made an $error} and more\n'
'this is text \\href{http://www.overleaf.com/foo=$bar}{i have made an $error} and more\n'
)
assert.equal(errors.length, 2)
assert.equal(errors[0].text, 'unclosed $ found at close group }')

View file

@ -481,7 +481,7 @@ describe('AuthenticationController', function () {
beforeEach(function () {
this.user = {
_id: 'user-id-123',
email: 'user@sharelatex.com',
email: 'user@overleaf.com',
}
this.middleware = this.AuthenticationController.requireLogin()
})
@ -491,7 +491,7 @@ describe('AuthenticationController', function () {
this.req.session = {
user: (this.user = {
_id: 'user-id-123',
email: 'user@sharelatex.com',
email: 'user@overleaf.com',
}),
}
this.middleware(this.req, this.res, this.next)
@ -524,7 +524,7 @@ describe('AuthenticationController', function () {
beforeEach(function () {
this.user = {
_id: 'user-id-123',
email: 'user@sharelatex.com',
email: 'user@overleaf.com',
}
this.middleware = this.AuthenticationController.validateUserSession()
})

View file

@ -63,7 +63,7 @@ describe('AuthenticationManager', function () {
beforeEach(function () {
this.user = {
_id: 'user-id',
email: (this.email = 'USER@sharelatex.com'),
email: (this.email = 'USER@overleaf.com'),
}
this.user.hashedPassword = this.testPassword
this.User.findOne = sinon.stub().callsArgWith(1, null, this.user)
@ -194,7 +194,7 @@ describe('AuthenticationManager', function () {
beforeEach(function () {
this.user = {
_id: '5c8791477192a80b5e76ca7e',
email: (this.email = 'USER@sharelatex.com'),
email: (this.email = 'USER@overleaf.com'),
}
this.db.users.updateOne = sinon
this.User.findOne = sinon.stub().callsArgWith(1, null, this.user)
@ -249,7 +249,7 @@ describe('AuthenticationManager', function () {
beforeEach(function () {
this.user = {
_id: 'user-id',
email: (this.email = 'USER@sharelatex.com'),
email: (this.email = 'USER@overleaf.com'),
}
this.unencryptedPassword = 'banana'
this.User.findOne = sinon.stub().callsArgWith(1, null, this.user)

View file

@ -25,7 +25,7 @@ describe('ChatApiHandler', function () {
this.settings = {
apis: {
chat: {
internal_url: 'chat.sharelatex.env',
internal_url: 'chat.overleaf.env',
},
},
}

View file

@ -17,7 +17,7 @@ describe('ContactManager', function () {
'@overleaf/settings': (this.settings = {
apis: {
contacts: {
url: 'http://contacts.sharelatex.com',
url: 'http://contacts.overleaf.com',
},
},
}),

View file

@ -15,7 +15,7 @@ describe('DocstoreManager', function () {
'@overleaf/settings': (this.settings = {
apis: {
docstore: {
url: 'docstore.sharelatex.com',
url: 'docstore.overleaf.com',
},
},
}),

View file

@ -30,7 +30,7 @@ describe('FileStoreHandler', function () {
this.readStream = { my: 'readStream', on: sinon.stub() }
this.request = sinon.stub()
this.request.head = sinon.stub()
this.filestoreUrl = 'http://filestore.sharelatex.test'
this.filestoreUrl = 'http://filestore.overleaf.test'
this.settings = {
apis: { filestore: { url: this.filestoreUrl } },
}

View file

@ -23,7 +23,7 @@ const _ = require('lodash')
describe('NotificationsHandler', function () {
const userId = '123nd3ijdks'
const notificationId = '123njdskj9jlk'
const notificationUrl = 'notification.sharelatex.testing'
const notificationUrl = 'notification.overleaf.testing'
beforeEach(function () {
this.request = sinon.stub().callsArgWith(1)

View file

@ -55,8 +55,8 @@ describe('ProjectEditorHandler', function () {
user: (this.owner = {
_id: 'owner-id',
first_name: 'Owner',
last_name: 'ShareLaTeX',
email: 'owner@sharelatex.com',
last_name: 'Overleaf',
email: 'owner@overleaf.com',
}),
privilegeLevel: 'owner',
},
@ -65,7 +65,7 @@ describe('ProjectEditorHandler', function () {
_id: 'read-only-id',
first_name: 'Read',
last_name: 'Only',
email: 'read-only@sharelatex.com',
email: 'read-only@overleaf.com',
},
privilegeLevel: 'readOnly',
},
@ -74,7 +74,7 @@ describe('ProjectEditorHandler', function () {
_id: 'read-write-id',
first_name: 'Read',
last_name: 'Write',
email: 'read-write@sharelatex.com',
email: 'read-write@overleaf.com',
},
privilegeLevel: 'readAndWrite',
},
@ -135,9 +135,9 @@ describe('ProjectEditorHandler', function () {
it('should include the owner', function () {
expect(this.result.owner).to.exist
this.result.owner._id.should.equal('owner-id')
this.result.owner.email.should.equal('owner@sharelatex.com')
this.result.owner.email.should.equal('owner@overleaf.com')
this.result.owner.first_name.should.equal('Owner')
this.result.owner.last_name.should.equal('ShareLaTeX')
this.result.owner.last_name.should.equal('Overleaf')
this.result.owner.privileges.should.equal('owner')
})
@ -169,16 +169,14 @@ describe('ProjectEditorHandler', function () {
findMember('read-only-id').privileges.should.equal('readOnly')
findMember('read-only-id').first_name.should.equal('Read')
findMember('read-only-id').last_name.should.equal('Only')
findMember('read-only-id').email.should.equal(
'read-only@sharelatex.com'
)
findMember('read-only-id').email.should.equal('read-only@overleaf.com')
expect(findMember('read-write-id')).to.exist
findMember('read-write-id').privileges.should.equal('readAndWrite')
findMember('read-write-id').first_name.should.equal('Read')
findMember('read-write-id').last_name.should.equal('Write')
findMember('read-write-id').email.should.equal(
'read-write@sharelatex.com'
'read-write@overleaf.com'
)
})

View file

@ -106,7 +106,7 @@ describe('SubscriptionController', function () {
subdomain: 'sl',
},
},
siteUrl: 'http://de.sharelatex.dev:3000',
siteUrl: 'http://de.overleaf.dev:3000',
}
this.AuthorizationManager = {
promises: {

View file

@ -58,7 +58,7 @@ describe('SubscriptionGroupHandler', function () {
findOne: sinon.stub().yields(),
}
this.settings = { siteUrl: 'http://www.sharelatex.com' }
this.settings = { siteUrl: 'http://www.overleaf.com' }
this.readStub = sinon.stub()
this.NotificationsBuilder = {

View file

@ -83,7 +83,7 @@ describe('TemplatesManager', function () {
apis: {
v1: {
url: (this.v1Url = 'http://overleaf.com'),
user: 'sharelatex',
user: 'overleaf',
pass: 'password',
},
},

View file

@ -17,7 +17,7 @@ const projectName = 'project_name_here'
const thirdPartyDataStoreApiUrl = 'http://third-party-json-store.herokuapp.com'
const siteUrl = 'http://www.localhost:3000'
const filestoreUrl = 'filestore.sharelatex.com'
const filestoreUrl = 'filestore.overleaf.com'
describe('TpdsUpdateSender', function () {
beforeEach(function () {
@ -34,7 +34,7 @@ describe('TpdsUpdateSender', function () {
getInvitedMemberIds: sinon.stub().resolves(this.memberIds),
},
}
this.docstoreUrl = 'docstore.sharelatex.env'
this.docstoreUrl = 'docstore.overleaf.env'
this.response = {
ok: true,
json: sinon.stub(),

View file

@ -82,7 +82,7 @@ describe('UserController', function () {
},
}
this.settings = { siteUrl: 'sharelatex.example.com' }
this.settings = { siteUrl: 'overleaf.example.com' }
this.UserHandler = {
promises: { populateTeamInvites: sinon.stub().resolves() },

View file

@ -30,7 +30,7 @@ describe('UserInfoController', function () {
})
describe('getPersonalInfo', function () {
describe('when the user exists with sharelatex id', function () {
describe('when the user exists with mongo id', function () {
beforeEach(function () {
this.user_id = new ObjectId().toString()
this.user = { _id: new ObjectId(this.user_id) }
@ -107,7 +107,7 @@ describe('UserInfoController', function () {
_id: new ObjectId(),
first_name: 'Douglas',
last_name: 'Adams',
email: 'doug@sharelatex.com',
email: 'doug@overleaf.com',
}
this.formattedInfo = {
id: this.user._id.toString(),
@ -129,7 +129,7 @@ describe('UserInfoController', function () {
_id: new ObjectId(),
first_name: 'Douglas',
last_name: 'Adams',
email: 'doug@sharelatex.com',
email: 'doug@overleaf.com',
password: 'should-not-get-included',
signUpDate: new Date(),
role: 'student',

View file

@ -18,9 +18,9 @@ describe('Translations', function () {
i18n: {
escapeHTMLInVars: false,
subdomainLang: {
www: { lngCode: 'en', url: 'https://www.sharelatex.com' },
fr: { lngCode: 'fr', url: 'https://fr.sharelatex.com' },
da: { lngCode: 'da', url: 'https://da.sharelatex.com' },
www: { lngCode: 'en', url: 'https://www.overleaf.com' },
fr: { lngCode: 'fr', url: 'https://fr.overleaf.com' },
da: { lngCode: 'da', url: 'https://da.overleaf.com' },
},
},
},
@ -95,7 +95,7 @@ describe('Translations', function () {
describe('setLangBasedOnDomainMiddleware', function () {
it('should set the lang to french if the domain is fr', function (done) {
req.headers.host = 'fr.sharelatex.com'
req.headers.host = 'fr.overleaf.com'
runMiddlewares(() => {
expect(req.lng).to.equal('fr')
done()
@ -105,7 +105,7 @@ describe('Translations', function () {
describe('suggestedLanguageSubdomainConfig', function () {
it('should set suggestedLanguageSubdomainConfig if the detected lang is different to subdomain lang', function (done) {
req.headers['accept-language'] = 'da, en-gb;q=0.8, en;q=0.7'
req.headers.host = 'fr.sharelatex.com'
req.headers.host = 'fr.overleaf.com'
runMiddlewares(() => {
expect(res.locals.suggestedLanguageSubdomainConfig).to.exist
expect(res.locals.suggestedLanguageSubdomainConfig.lngCode).to.equal(
@ -117,7 +117,7 @@ describe('Translations', function () {
it('should not set suggestedLanguageSubdomainConfig if the detected lang is the same as subdomain lang', function (done) {
req.headers['accept-language'] = 'da, en-gb;q=0.8, en;q=0.7'
req.headers.host = 'da.sharelatex.com'
req.headers.host = 'da.overleaf.com'
runMiddlewares(() => {
expect(res.locals.suggestedLanguageSubdomainConfig).to.not.exist
done()