2019-05-29 05:21:06 -04:00
|
|
|
module.exports = {
|
|
|
|
group: {
|
|
|
|
modelName: 'Subscription',
|
|
|
|
readOnly: true,
|
|
|
|
hasMembersLimit: true,
|
|
|
|
fields: {
|
|
|
|
primaryKey: '_id',
|
|
|
|
read: ['invited_emails', 'teamInvites', 'member_ids'],
|
|
|
|
write: null,
|
|
|
|
access: 'manager_ids',
|
2021-04-27 03:52:58 -04:00
|
|
|
name: 'teamName',
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
baseQuery: {
|
2021-04-27 03:52:58 -04:00
|
|
|
groupPlan: true,
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
translations: {
|
2022-07-15 06:05:34 -04:00
|
|
|
title: 'group_subscription',
|
2019-05-29 05:21:06 -04:00
|
|
|
subtitle: 'members_management',
|
2021-04-27 03:52:58 -04:00
|
|
|
remove: 'remove_from_group',
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
pathsFor(id) {
|
|
|
|
return {
|
|
|
|
addMember: `/manage/groups/${id}/invites`,
|
|
|
|
removeMember: `/manage/groups/${id}/user`,
|
|
|
|
removeInvite: `/manage/groups/${id}/invites`,
|
2021-04-27 03:52:58 -04:00
|
|
|
exportMembers: `/manage/groups/${id}/members/export`,
|
2019-05-29 05:21:06 -04:00
|
|
|
}
|
2021-04-27 03:52:58 -04:00
|
|
|
},
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
team: {
|
|
|
|
// for metrics only
|
|
|
|
modelName: 'Subscription',
|
|
|
|
fields: {
|
|
|
|
primaryKey: 'overleaf.id',
|
2021-04-27 03:52:58 -04:00
|
|
|
access: 'manager_ids',
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
baseQuery: {
|
2021-04-27 03:52:58 -04:00
|
|
|
groupPlan: true,
|
|
|
|
},
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
groupManagers: {
|
|
|
|
modelName: 'Subscription',
|
|
|
|
fields: {
|
|
|
|
primaryKey: '_id',
|
|
|
|
read: ['manager_ids'],
|
|
|
|
write: 'manager_ids',
|
|
|
|
access: 'manager_ids',
|
2021-04-27 03:52:58 -04:00
|
|
|
name: 'teamName',
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
baseQuery: {
|
2021-04-27 03:52:58 -04:00
|
|
|
groupPlan: true,
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
translations: {
|
2022-07-15 06:05:34 -04:00
|
|
|
title: 'group_subscription',
|
2019-05-29 05:21:06 -04:00
|
|
|
subtitle: 'managers_management',
|
2021-04-27 03:52:58 -04:00
|
|
|
remove: 'remove_manager',
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
pathsFor(id) {
|
|
|
|
return {
|
|
|
|
addMember: `/manage/groups/${id}/managers`,
|
2021-04-27 03:52:58 -04:00
|
|
|
removeMember: `/manage/groups/${id}/managers`,
|
2019-05-29 05:21:06 -04:00
|
|
|
}
|
2021-04-27 03:52:58 -04:00
|
|
|
},
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
institution: {
|
|
|
|
modelName: 'Institution',
|
|
|
|
fields: {
|
|
|
|
primaryKey: 'v1Id',
|
|
|
|
read: ['managerIds'],
|
|
|
|
write: 'managerIds',
|
|
|
|
access: 'managerIds',
|
2021-04-27 03:52:58 -04:00
|
|
|
name: 'name',
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
translations: {
|
|
|
|
title: 'institution_account',
|
|
|
|
subtitle: 'managers_management',
|
2021-04-27 03:52:58 -04:00
|
|
|
remove: 'remove_manager',
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
pathsFor(id) {
|
|
|
|
return {
|
|
|
|
index: `/manage/institutions/${id}/managers`,
|
|
|
|
addMember: `/manage/institutions/${id}/managers`,
|
2021-04-27 03:52:58 -04:00
|
|
|
removeMember: `/manage/institutions/${id}/managers`,
|
2019-05-29 05:21:06 -04:00
|
|
|
}
|
2021-04-27 03:52:58 -04:00
|
|
|
},
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
publisher: {
|
|
|
|
modelName: 'Publisher',
|
|
|
|
fields: {
|
|
|
|
primaryKey: 'slug',
|
|
|
|
read: ['managerIds'],
|
|
|
|
write: 'managerIds',
|
|
|
|
access: 'managerIds',
|
2021-04-27 03:52:58 -04:00
|
|
|
name: 'name',
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
translations: {
|
|
|
|
title: 'publisher_account',
|
|
|
|
subtitle: 'managers_management',
|
2021-04-27 03:52:58 -04:00
|
|
|
remove: 'remove_manager',
|
2019-05-29 05:21:06 -04:00
|
|
|
},
|
|
|
|
pathsFor(id) {
|
|
|
|
return {
|
|
|
|
index: `/manage/publishers/${id}/managers`,
|
|
|
|
addMember: `/manage/publishers/${id}/managers`,
|
2021-04-27 03:52:58 -04:00
|
|
|
removeMember: `/manage/publishers/${id}/managers`,
|
2019-05-29 05:21:06 -04:00
|
|
|
}
|
2021-04-27 03:52:58 -04:00
|
|
|
},
|
|
|
|
},
|
2019-05-29 05:21:06 -04:00
|
|
|
}
|