mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 14:03:42 -05:00
22 lines
480 B
JavaScript
22 lines
480 B
JavaScript
|
/* eslint-disable no-unused-vars */
|
||
|
|
||
|
const Helpers = require('./lib/helpers')
|
||
|
|
||
|
exports.tags = ['saas']
|
||
|
|
||
|
exports.migrate = async client => {
|
||
|
const { db } = client
|
||
|
await db.subscriptions.updateMany(
|
||
|
{ groupPolicy: { $exists: true } },
|
||
|
{ $set: { managedUsersEnabled: true } }
|
||
|
)
|
||
|
}
|
||
|
|
||
|
exports.rollback = async client => {
|
||
|
const { db } = client
|
||
|
await db.subscriptions.updateMany(
|
||
|
{ groupPolicy: { $exists: true } },
|
||
|
{ $unset: { managedUsersEnabled: '' } }
|
||
|
)
|
||
|
}
|