Allow builders (not just admins) to delete apps.
This commit is contained in:
parent
39494beb80
commit
a05e21ee4b
|
@ -1,12 +1,12 @@
|
|||
const Router = require("@koa/router")
|
||||
const controller = require("../../controllers/global/roles")
|
||||
const { adminOnly } = require("@budibase/backend-core/auth")
|
||||
const builderOrAdmin = require("../../../middleware/builderOrAdmin")
|
||||
|
||||
const router = Router()
|
||||
|
||||
router
|
||||
.get("/api/global/roles", adminOnly, controller.fetch)
|
||||
.get("/api/global/roles/:appId", adminOnly, controller.find)
|
||||
.delete("/api/global/roles/:appId", adminOnly, controller.removeAppRole)
|
||||
.get("/api/global/roles", builderOrAdmin, controller.fetch)
|
||||
.get("/api/global/roles/:appId", builderOrAdmin, controller.find)
|
||||
.delete("/api/global/roles/:appId", builderOrAdmin, controller.removeAppRole)
|
||||
|
||||
module.exports = router
|
||||
|
|
Loading…
Reference in New Issue