Skip to content

Commit

Permalink
Merge branch 'dev' into wip/bewest/daytoday-redo-03
Browse files Browse the repository at this point in the history
  • Loading branch information
bewest committed Jan 27, 2023
2 parents b376239 + 3b7528a commit 5d3268a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion lib/api/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function create (env, ctx) {
*
* Expecting to define extended syntax and support for several query params
*/
properties.use(ctx.authorization.isPermitted('api:entries:read'),
ctx.authorization.isPermitted('api:treatments:read'));
properties.get(['/', '/*'], function getProperties (req, res) {

var sbx = sandbox.serverInit(env, ctx);
Expand Down Expand Up @@ -57,4 +59,4 @@ function create (env, ctx) {
return properties;
}

module.exports = create;
module.exports = create;
2 changes: 2 additions & 0 deletions lib/data/endpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ function configure (app, ctx) {
next( );
});

api.use(ctx.authorization.isPermitted('api:entries:read'),
ctx.authorization.isPermitted('api:treatments:read'));
api.get('/at/:at?', ensure_at, get_ddata, format_result);

return api;
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"moment-locales-webpack-plugin": "^1.2.0",
"moment-timezone": "^0.5.31",
"moment-timezone-data-webpack-plugin": "^1.5.0",
"mongo-url-parser": "^1.0.1",
"mongo-url-parser": "^1.0.2",
"mongodb": "^3.6.0",
"mongomock": "^0.1.2",
"node-cache": "^4.2.1",
Expand Down

0 comments on commit 5d3268a

Please sign in to comment.