mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-05 07:09:02 +02:00
Merge pull request #16980 from overleaf/jpa-join-project-remove-sl-2
[misc] joinProject: pass userId and anonymous access token in body 2/2 GitOrigin-RevId: b1a11941a6d9c7cc779769d1e97d3a0f03bed610
This commit is contained in:
@@ -57,7 +57,7 @@ const unsupportedSpellcheckLanguages = [
|
||||
|
||||
async function joinProject(req, res, next) {
|
||||
const projectId = req.params.Project_id
|
||||
let userId = req.body.userId || req.query.user_id // keep schema in sync with router
|
||||
let userId = req.body.userId // keep schema in sync with router
|
||||
if (userId === 'anonymous-user') {
|
||||
userId = null
|
||||
}
|
||||
@@ -177,8 +177,7 @@ async function _buildJoinProjectView(req, projectId, userId) {
|
||||
await CollaboratorsGetter.promises.getInvitedMembersWithPrivilegeLevels(
|
||||
projectId
|
||||
)
|
||||
const token =
|
||||
req.body.anonymousAccessToken || req.headers['x-sl-anonymous-access-token']
|
||||
const token = req.body.anonymousAccessToken
|
||||
const privilegeLevel =
|
||||
await AuthorizationManager.promises.getPrivilegeLevelForProject(
|
||||
userId,
|
||||
|
||||
Reference in New Issue
Block a user