8 changed files with 68 additions and 3 deletions
@ -0,0 +1,15 @@ |
|||
'use strict'; |
|||
|
|||
/* globals db */ |
|||
|
|||
const cursor = db.users.find({ }); |
|||
while (cursor.hasNext()) { |
|||
const user = cursor.next(); |
|||
print(`updating user: ${user.username}`); |
|||
db.users.updateOne( |
|||
{ _id: user._id }, |
|||
{ |
|||
$set: { 'permissions.canCreateLinks': true }, |
|||
}, |
|||
); |
|||
} |
Loading…
Reference in new issue