MCPcopy Index your code
hub / github.com/parse-community/parse-server / enforceMasterKeyAccess

Function enforceMasterKeyAccess

src/middlewares.js:624–632  ·  view source on GitHub ↗
(req, res, next)

Source from the content-addressed store, hash-verified

622}
623
624export function enforceMasterKeyAccess(req, res, next) {
625 if (!req.auth.isMaster) {
626 const error = createSanitizedHttpError(403, 'unauthorized: master key is required', req.config);
627 res.status(error.status);
628 res.end(`{"error":"${error.message}"}`);
629 return;
630 }
631 next();
632}
633
634export function promiseEnforceMasterKeyAccess(request) {
635 if (!request.auth.isMaster) {

Callers

nothing calls this directly

Calls 2

createSanitizedHttpErrorFunction · 0.90
nextFunction · 0.85

Tested by

no test coverage detected