mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-26 13:02:06 +00:00
Added new properties to "project-opened" event (#23438)
GitOrigin-RevId: e7d3c665abfe485246281e949a645bb90f288dab
This commit is contained in:
parent
b75917eb9f
commit
874b37c917
1 changed files with 14 additions and 0 deletions
|
@ -576,7 +576,21 @@ const _ProjectController = {
|
|||
const namedEditors = project.collaberator_refs?.length || 0
|
||||
const pendingEditors = project.pendingEditor_refs?.length || 0
|
||||
const exceedAtLimit = planLimit > -1 && namedEditors >= planLimit
|
||||
|
||||
let editMode = 'edit'
|
||||
if (privilegeLevel === PrivilegeLevels.READ_ONLY) {
|
||||
editMode = 'view'
|
||||
} else if (
|
||||
project.track_changes === true ||
|
||||
project.track_changes?.[userId] === true
|
||||
) {
|
||||
editMode = 'review'
|
||||
}
|
||||
|
||||
const projectOpenedSegmentation = {
|
||||
role: privilegeLevel,
|
||||
editMode,
|
||||
ownerId: project.owner_ref,
|
||||
projectId: project._id,
|
||||
namedEditors,
|
||||
pendingEditors,
|
||||
|
|
Loading…
Add table
Reference in a new issue