Skip to content

Commit 9ee8149

Browse files
committed
Added required permission for posting to rasa parse.
1 parent eb19952 commit 9ee8149

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

server/authentication/guard.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ function hasCustomPermission(req, permissions) {
3333
`${req.params.talkWrapper}:${req.method === 'GET' ? 'read' : 'write'}`,
3434
);
3535
} else if (req.params.agent) {
36+
if (req.route.path === '/training/parse/:agent') {
37+
return _.includes(permissions, `${req.params.agent}:read`);
38+
}
3639
return _.includes(
3740
permissions,
3841
`${req.params.agent}:${req.method === 'GET' ? 'read' : 'write'}`,

0 commit comments

Comments
 (0)