Added access rights feature + read access check

This commit is contained in:
NGPixel
2016-10-31 22:44:00 -04:00
parent 09b4d37f4c
commit a05560e9fc
9 changed files with 122 additions and 17 deletions

View File

@@ -28,6 +28,7 @@ global.git = require('./libs/git').init(appconfig, false);
global.lang = require('i18next');
global.mark = require('./libs/markdown');
global.upl = require('./libs/uploads').init(appconfig);
global.rights = require('./libs/rights');
// ----------------------------------------
// Load modules
@@ -217,9 +218,6 @@ io.use(passportSocketIo.authorize({
accept();
},
fail: (data, message, error, accept) => {
if(error) {
throw new Error(message);
}
return accept(new Error(message));
}
}));