Skip to content

Commit

Permalink
Fix permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
hardillb committed Jan 16, 2025
1 parent 50e0dac commit b27196d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions forge/ee/routes/teamBroker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,11 @@ module.exports = async function (app) {
* @memberof forge.routes.api.team.broker
*/
app.get('/:brokerId/credentials', {
// TODO Needs custom preHandler to work with token for mqtt agent only
// preHandler: app.needsPermission('broker:topics:list'),
preHandler: [
async (request, reply) => {
// TODO Needs custom preHandler to work with token for mqtt agent only
}
],
schema: {
summary: 'Gets credentials for a 3rd party MQTT broker',
tags: ['MQTT Broker'],
Expand Down Expand Up @@ -531,7 +534,7 @@ module.exports = async function (app) {
* Remove 3rd Party Broker credentials
*/
app.delete('/:brokerId/credentials', {
preHandler: app.needsPermission('broker:topics:delete'),
preHandler: app.needsPermission('broker:credentials:delete'),
schema: {
summary: 'Delete credentials for a 3rd party MQTT broker',
tags: ['MQTT Broker'],
Expand Down

0 comments on commit b27196d

Please sign in to comment.