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

Function setPermissionsOnClass

spec/ParseLiveQuery.spec.js:1405–1423  ·  view source on GitHub ↗
(className, permissions, doPut)

Source from the content-addressed store, hash-verified

1403
1404 describe('class level permissions', () => {
1405 async function setPermissionsOnClass(className, permissions, doPut) {
1406 const method = doPut ? 'PUT' : 'POST';
1407 const response = await fetch(Parse.serverURL + '/schemas/' + className, {
1408 method,
1409 headers: {
1410 'X-Parse-Application-Id': Parse.applicationId,
1411 'X-Parse-Master-Key': Parse.masterKey,
1412 'Content-Type': 'application/json',
1413 },
1414 body: JSON.stringify({
1415 classLevelPermissions: permissions,
1416 }),
1417 });
1418 const body = await response.json();
1419 if (body.error) {
1420 throw body;
1421 }
1422 return body;
1423 }
1424
1425 it('delivers LiveQuery event to authenticated client when CLP allows find', async () => {
1426 await reconfigureServer({

Callers 1

Calls 1

fetchFunction · 0.70

Tested by

no test coverage detected