forked from tsai/budibase
committed by
GitHub
2 changed files with 12 additions and 1 deletions
@ -0,0 +1,10 @@ |
|||
module.exports = async (ctx, next) => { |
|||
if ( |
|||
!ctx.internal && |
|||
(!ctx.user || !ctx.user.builder || !ctx.user.builder.global) && |
|||
(!ctx.user || !ctx.user.admin || !ctx.user.admin.global) |
|||
) { |
|||
ctx.throw(403, "Builder user only endpoint.") |
|||
} |
|||
return next() |
|||
} |
|||
Loading…
Reference in new issue