Skip to content

Commit

Permalink
- require flows.write permission for all http endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
skylord123 committed Mar 12, 2024
1 parent 34472f4 commit 92dec2c
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/docker-config-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ module.exports = function (RED: Red) {
}


RED.httpAdmin.post("/configSearch", function (req, res) {
RED.httpAdmin.post("/configSearch", RED.auth.needsPermission('flows.write'), function (req, res) {
RED.log.debug("POST /configSearch");

const nodeId = req.body.id;
Expand Down
2 changes: 1 addition & 1 deletion src/docker-container-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ module.exports = function (RED: Red) {
}
}

RED.httpAdmin.post("/containerSearch", function (req, res) {
RED.httpAdmin.post("/containerSearch", RED.auth.needsPermission('flows.write'), RED.auth.needsPermission('flows.write'), function (req, res) {
RED.log.debug("POST /containerSearch");

const nodeId = req.body.id;
Expand Down
2 changes: 1 addition & 1 deletion src/docker-image-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ module.exports = function (RED: Red) {
}
}

RED.httpAdmin.post("/imageSearch", function (req, res) {
RED.httpAdmin.post("/imageSearch", RED.auth.needsPermission('flows.write'), function (req, res) {
RED.log.debug("POST /imageSearch");

const nodeId = req.body.id;
Expand Down
2 changes: 1 addition & 1 deletion src/docker-network-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ module.exports = function (RED: Red) {
}
}

RED.httpAdmin.post("/networkSearch", function (req, res) {
RED.httpAdmin.post("/networkSearch", RED.auth.needsPermission('flows.write'), function (req, res) {
RED.log.debug("POST /networkSearch");

const nodeId = req.body.id;
Expand Down
2 changes: 1 addition & 1 deletion src/docker-node-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ module.exports = function (RED: Red) {
}


RED.httpAdmin.post("/nodeSearch", function (req, res) {
RED.httpAdmin.post("/nodeSearch", RED.auth.needsPermission('flows.write'), function (req, res) {
RED.log.debug("POST /nodeSearch");

const nodeId = req.body.id;
Expand Down
2 changes: 1 addition & 1 deletion src/docker-plugin-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ module.exports = function (RED: Red) {
}
}

RED.httpAdmin.post("/pluginSearch", function (req, res) {
RED.httpAdmin.post("/pluginSearch", RED.auth.needsPermission('flows.write'), function (req, res) {
RED.log.debug("POST /pluginSearch");

const nodeId = req.body.id;
Expand Down
2 changes: 1 addition & 1 deletion src/docker-secret-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ module.exports = function (RED: Red) {
}
}

RED.httpAdmin.post("/secretSearch", function (req, res) {
RED.httpAdmin.post("/secretSearch", RED.auth.needsPermission('flows.write'), function (req, res) {
RED.log.debug("POST /secretSearch");

const nodeId = req.body.id;
Expand Down
2 changes: 1 addition & 1 deletion src/docker-service-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ module.exports = function (RED: Red) {
}
}

RED.httpAdmin.post("/serviceSearch", function (req, res) {
RED.httpAdmin.post("/serviceSearch", RED.auth.needsPermission('flows.write'), function (req, res) {
RED.log.debug("POST /serviceSearch");

const nodeId = req.body.id;
Expand Down
2 changes: 1 addition & 1 deletion src/docker-task-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module.exports = function (RED: Red) {
}
}

RED.httpAdmin.post("/taskSearch", function (req, res) {
RED.httpAdmin.post("/taskSearch", RED.auth.needsPermission('flows.write'), function (req, res) {
RED.log.debug("POST /taskSearch");

const nodeId = req.body.id;
Expand Down
2 changes: 1 addition & 1 deletion src/docker-volume-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ module.exports = function (RED: Red) {
}
}

RED.httpAdmin.post("/volumeSearch", function (req, res) {
RED.httpAdmin.post("/volumeSearch", RED.auth.needsPermission('flows.write'), function (req, res) {
RED.log.debug("POST /volumeSearch");

const nodeId = req.body.id;
Expand Down

0 comments on commit 92dec2c

Please sign in to comment.