WiP on permissions
Doesn't run. This commit is just to backup the changes.
This commit is contained in:
parent
5df444f641
commit
89c9615592
37 changed files with 913 additions and 366 deletions
29
lib/context-helpers.js
Normal file
29
lib/context-helpers.js
Normal 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
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue