Merge pull request #22994 from overleaf/jdt-diasble-assist
Add a toggle to hide all AI features on a users account GitOrigin-RevId: 978b02609c40f3975daa267aa6c10ac49e13d6f3
This commit is contained in:
committed by
Copybot
parent
e228b77c14
commit
0baaed6cdf
@@ -0,0 +1,28 @@
|
||||
import { db } from '../app/src/infrastructure/mongodb.js'
|
||||
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
|
||||
async function main() {
|
||||
// update all applicable user models
|
||||
await batchedUpdate(
|
||||
db.users,
|
||||
{
|
||||
'writefull.enabled': false,
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
'aiErrorAssistant.enabled': false,
|
||||
},
|
||||
}
|
||||
)
|
||||
console.log('completed syncing writefull state with error assist')
|
||||
}
|
||||
|
||||
export default main
|
||||
|
||||
try {
|
||||
await main()
|
||||
process.exit(0)
|
||||
} catch (error) {
|
||||
console.error({ error })
|
||||
process.exit(1)
|
||||
}
|
||||
Reference in New Issue
Block a user