diff options
author | Romulus Tsai 蔡仲明 <urakagi@gmail.com> | 2020-05-08 09:35:11 +0800 |
---|---|---|
committer | Romulus Tsai 蔡仲明 <urakagi@gmail.com> | 2020-05-08 09:35:11 +0800 |
commit | cfcc73724fcd394150d1b815d0a7a4c466e216b5 (patch) | |
tree | a9648255f14cd8b0e1ad8eee1f8d42337a0668bc /sandstorm.js | |
parent | a3658993128bdddd5d40f792c19281dc5eac51f5 (diff) | |
parent | 533bc045d06269dba2f42cdfe61817a1b3407974 (diff) | |
download | wekan-cfcc73724fcd394150d1b815d0a7a4c466e216b5.tar.gz wekan-cfcc73724fcd394150d1b815d0a7a4c466e216b5.tar.bz2 wekan-cfcc73724fcd394150d1b815d0a7a4c466e216b5.zip |
Merge branch 'master' of https://github.com/wekan/wekan
Diffstat (limited to 'sandstorm.js')
-rw-r--r-- | sandstorm.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sandstorm.js b/sandstorm.js index d6d25713..8615e419 100644 --- a/sandstorm.js +++ b/sandstorm.js @@ -22,9 +22,7 @@ const sandstormBoard = { if (isSandstorm && Meteor.isServer) { const fs = require('fs'); - const pathParts = process.cwd().split('/'); - const path = pathParts.join('/'); - const Capnp = Npm.require(`${path}../../../node_modules/capnp.js`); + const Capnp = Npm.require(`capnp`); const Package = Capnp.importSystem('sandstorm/package.capnp'); const Powerbox = Capnp.importSystem('sandstorm/powerbox.capnp'); const Identity = Capnp.importSystem('sandstorm/identity.capnp'); @@ -55,7 +53,7 @@ if (isSandstorm && Meteor.isServer) { const parsedDescriptor = Capnp.parse( Powerbox.PowerboxDescriptor, - new Buffer(descriptor, 'base64'), + Buffer.from(descriptor, 'base64'), { packed: true }, ); @@ -153,7 +151,10 @@ if (isSandstorm && Meteor.isServer) { return session.activity(event); }) - .then(() => done(), e => done(e)); + .then( + () => done(), + e => done(e), + ); })(); } @@ -236,12 +237,14 @@ if (isSandstorm && Meteor.isServer) { const isAdmin = permissions.indexOf('configure') > -1; const isCommentOnly = false; const isNoComments = false; + const isWorker = false; const permissionDoc = { userId, isActive, isAdmin, isNoComments, isCommentOnly, + isWorker, }; const boardMembers = Boards.findOne(sandstormBoard._id).members; |