mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Switch V1 naming instead of OL
This commit is contained in:
parent
8735261022
commit
8df31590a9
2 changed files with 8 additions and 8 deletions
|
@ -19,7 +19,7 @@ fs = require "fs"
|
|||
InactiveProjectManager = require("../InactiveData/InactiveProjectManager")
|
||||
ProjectUpdateHandler = require("./ProjectUpdateHandler")
|
||||
ProjectGetter = require("./ProjectGetter")
|
||||
OlProjectGetter = require("./OlProjectGetter")
|
||||
V1ProjectGetter = require("./V1ProjectGetter")
|
||||
PrivilegeLevels = require("../Authorization/PrivilegeLevels")
|
||||
AuthenticationController = require("../Authentication/AuthenticationController")
|
||||
PackageVersions = require("../../infrastructure/PackageVersions")
|
||||
|
@ -153,7 +153,7 @@ module.exports = ProjectController =
|
|||
projects: (cb)->
|
||||
ProjectGetter.findAllUsersProjects user_id, 'name lastUpdated publicAccesLevel archived owner_ref tokens', cb
|
||||
v1Projects: (cb) ->
|
||||
OlProjectGetter.findAllUsersProjects user_id, cb
|
||||
V1ProjectGetter.findAllUsersProjects user_id, cb
|
||||
hasSubscription: (cb)->
|
||||
LimitationsManager.userHasSubscriptionOrIsGroupMember currentUser, cb
|
||||
user: (cb) ->
|
||||
|
@ -398,7 +398,7 @@ module.exports = ProjectController =
|
|||
showLinkSharingOnboarding: showLinkSharingOnboarding
|
||||
timer.done()
|
||||
|
||||
_buildProjectList: (allProjects, olProjects = [])->
|
||||
_buildProjectList: (allProjects, v1Projects = [])->
|
||||
{owned, readAndWrite, readOnly, tokenReadAndWrite, tokenReadOnly} = allProjects
|
||||
projects = []
|
||||
for project in owned
|
||||
|
@ -408,8 +408,8 @@ module.exports = ProjectController =
|
|||
projects.push ProjectController._buildProjectViewModel(project, "readWrite", Sources.INVITE)
|
||||
for project in readOnly
|
||||
projects.push ProjectController._buildProjectViewModel(project, "readOnly", Sources.INVITE)
|
||||
for project in olProjects
|
||||
projects.push ProjectController._buildOlProjectViwModel(project)
|
||||
for project in v1Projects
|
||||
projects.push ProjectController._buildV1ProjectViewModel(project)
|
||||
# Token-access
|
||||
# Only add these projects if they're not already present, this gives us cascading access
|
||||
# from 'owner' => 'token-read-only'
|
||||
|
@ -438,7 +438,7 @@ module.exports = ProjectController =
|
|||
}
|
||||
return model
|
||||
|
||||
_buildOlProjectViewModel: (project) ->
|
||||
_buildV1ProjectViewModel: (project) ->
|
||||
{
|
||||
id: project.id
|
||||
name: project.title
|
||||
|
|
|
@ -4,7 +4,7 @@ logger = require 'logger-sharelatex'
|
|||
|
||||
INTEGRATION_MODULE_PATH = path.resolve(__dirname, '../../../../modules/overleaf-integration-web-module')
|
||||
|
||||
module.exports = OlProjectGetter =
|
||||
module.exports = V1ProjectGetter =
|
||||
integrationModuleExists: (callback = (error, stats) ->) ->
|
||||
fs.stat INTEGRATION_MODULE_PATH, (error, stats) ->
|
||||
if error? or !stats.isDirectory()
|
||||
|
@ -12,7 +12,7 @@ module.exports = OlProjectGetter =
|
|||
return callback(true)
|
||||
|
||||
findAllUsersProjects: (userId, callback = (error, projects) ->) ->
|
||||
OlProjectGetter.integrationModuleExists (exists) ->
|
||||
V1ProjectGetter.integrationModuleExists (exists) ->
|
||||
if exists
|
||||
logger.log {exists}, "integration module does exist, loading V1 projects"
|
||||
V1ProjectListGetter = require(path.join(INTEGRATION_MODULE_PATH, 'app/coffee/ProjectList/ProjectListGetter'))
|
Loading…
Reference in a new issue