WiP on permissions

Doesn't run. This commit is just to backup the changes.
This commit is contained in:
Tomas Bures 2017-07-26 22:42:05 +03:00
parent 5df444f641
commit 89c9615592
37 changed files with 913 additions and 366 deletions

29
lib/context-helpers.js Normal file
View file

@ -0,0 +1,29 @@
'use strict';
const knex = require('../lib/knex');
function getRequestContext(req) {
const context = {
user: req.user
};
return context;
}
function getServiceContext() {
const context = {
user: {
id: 1,
username: 'admin',
name: 'Service worker',
email: ''
}
};
return context;
}
module.exports = {
getRequestContext,
getServiceContext
};