1 parent eb19952 commit 9ee8149Copy full SHA for 9ee8149
1 file changed
server/authentication/guard.js
@@ -33,6 +33,9 @@ function hasCustomPermission(req, permissions) {
33
`${req.params.talkWrapper}:${req.method === 'GET' ? 'read' : 'write'}`,
34
);
35
} else if (req.params.agent) {
36
+ if (req.route.path === '/training/parse/:agent') {
37
+ return _.includes(permissions, `${req.params.agent}:read`);
38
+ }
39
return _.includes(
40
permissions,
41
`${req.params.agent}:${req.method === 'GET' ? 'read' : 'write'}`,
0 commit comments