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

Function enforceMasterKeyAccess

src/GraphQL/parseGraphQLUtils.js:5–13  ·  view source on GitHub ↗
(auth, config)

Source from the content-addressed store, hash-verified

3import { createSanitizedError } from '../Error';
4
5export function enforceMasterKeyAccess(auth, config) {
6 if (!auth.isMaster) {
7 throw createSanitizedError(
8 Parse.Error.OPERATION_FORBIDDEN,
9 'unauthorized: master key is required',
10 config
11 );
12 }
13}
14
15export function toGraphQLError(error) {
16 let code, message;

Callers 2

loadFunction · 0.90
loadFunction · 0.90

Calls 1

createSanitizedErrorFunction · 0.90

Tested by

no test coverage detected