From d36fde046b575f3d983d75136ebaf2adc70a88ee Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 3 Aug 2022 14:35:10 +0100 Subject: [PATCH 1/2] fix redirect loop in overview page --- packages/worker/src/api/routes/global/users.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/worker/src/api/routes/global/users.js b/packages/worker/src/api/routes/global/users.js index e62e996443..677fe018e9 100644 --- a/packages/worker/src/api/routes/global/users.js +++ b/packages/worker/src/api/routes/global/users.js @@ -64,7 +64,7 @@ router .post("/api/global/users/search", builderOrAdmin, controller.search) .delete("/api/global/users/:id", adminOnly, controller.destroy) .post("/api/global/users/bulkDelete", adminOnly, controller.bulkDelete) - .get("/api/global/users/count/:appId", adminOnly, controller.countByApp) + .get("/api/global/users/count/:appId", controller.countByApp) .get("/api/global/roles/:appId") .post( "/api/global/users/invite", From 1da4645d58a9f44ce086c7c10cb95399cc69efd2 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 3 Aug 2022 14:37:41 +0100 Subject: [PATCH 2/2] use correct middleware --- packages/worker/src/api/routes/global/users.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/worker/src/api/routes/global/users.js b/packages/worker/src/api/routes/global/users.js index 677fe018e9..4d0144d6e0 100644 --- a/packages/worker/src/api/routes/global/users.js +++ b/packages/worker/src/api/routes/global/users.js @@ -64,7 +64,7 @@ router .post("/api/global/users/search", builderOrAdmin, controller.search) .delete("/api/global/users/:id", adminOnly, controller.destroy) .post("/api/global/users/bulkDelete", adminOnly, controller.bulkDelete) - .get("/api/global/users/count/:appId", controller.countByApp) + .get("/api/global/users/count/:appId", builderOrAdmin, controller.countByApp) .get("/api/global/roles/:appId") .post( "/api/global/users/invite",