Invite is adminOnly

This commit is contained in:
Mel O'Hagan 2022-11-28 16:02:49 +00:00
parent bc68b16526
commit 0b3d84b63d
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
const Router = require("@koa/router")
const controller = require("../../controllers/global/users")
const { joiValidator } = require("@budibase/backend-core/auth")
const { adminOnly } = require("@budibase/backend-core/auth")
const Joi = require("joi")
const cloudRestricted = require("../../../middleware/cloudRestricted")
const { users } = require("../validation")
@ -68,13 +69,13 @@ router
.get("/api/global/roles/:appId")
.post(
"/api/global/users/invite",
builderOrAdmin,
adminOnly,
buildInviteValidation(),
controller.invite
)
.post(
"/api/global/users/multi/invite",
builderOrAdmin,
adminOnly,
buildInviteMultipleValidation(),
controller.inviteMultiple
)