Allow builders (not just admins) to delete apps.
This commit is contained in:
parent
881ad63a13
commit
d23af4dec1
1 changed files with 4 additions and 4 deletions
|
@ -1,12 +1,12 @@
|
||||||
const Router = require("@koa/router")
|
const Router = require("@koa/router")
|
||||||
const controller = require("../../controllers/global/roles")
|
const controller = require("../../controllers/global/roles")
|
||||||
const { adminOnly } = require("@budibase/backend-core/auth")
|
const builderOrAdmin = require("../../../middleware/builderOrAdmin")
|
||||||
|
|
||||||
const router = Router()
|
const router = Router()
|
||||||
|
|
||||||
router
|
router
|
||||||
.get("/api/global/roles", adminOnly, controller.fetch)
|
.get("/api/global/roles", builderOrAdmin, controller.fetch)
|
||||||
.get("/api/global/roles/:appId", adminOnly, controller.find)
|
.get("/api/global/roles/:appId", builderOrAdmin, controller.find)
|
||||||
.delete("/api/global/roles/:appId", adminOnly, controller.removeAppRole)
|
.delete("/api/global/roles/:appId", builderOrAdmin, controller.removeAppRole)
|
||||||
|
|
||||||
module.exports = router
|
module.exports = router
|
||||||
|
|
Loading…
Reference in a new issue