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 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 a new issue