Skip to content

Commit 5d3268a

Browse files
authored
Merge branch 'dev' into wip/bewest/daytoday-redo-03
2 parents b376239 + 3b7528a commit 5d3268a

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

lib/api/properties.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ function create (env, ctx) {
1818
*
1919
* Expecting to define extended syntax and support for several query params
2020
*/
21+
properties.use(ctx.authorization.isPermitted('api:entries:read'),
22+
ctx.authorization.isPermitted('api:treatments:read'));
2123
properties.get(['/', '/*'], function getProperties (req, res) {
2224

2325
var sbx = sandbox.serverInit(env, ctx);
@@ -57,4 +59,4 @@ function create (env, ctx) {
5759
return properties;
5860
}
5961

60-
module.exports = create;
62+
module.exports = create;

lib/data/endpoints.js

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ function configure (app, ctx) {
6464
next( );
6565
});
6666

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

6971
return api;

package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"moment-locales-webpack-plugin": "^1.2.0",
115115
"moment-timezone": "^0.5.31",
116116
"moment-timezone-data-webpack-plugin": "^1.5.0",
117-
"mongo-url-parser": "^1.0.1",
117+
"mongo-url-parser": "^1.0.2",
118118
"mongodb": "^3.6.0",
119119
"mongomock": "^0.1.2",
120120
"node-cache": "^4.2.1",

0 commit comments

Comments
 (0)