MCPcopy Create free account
hub / github.com/parse-community/parse-server / transformObjectACL

Function transformObjectACL

src/Controllers/DatabaseController.js:93–110  ·  view source on GitHub ↗
({ ACL, ...result })

Source from the content-addressed store, hash-verified

91
92// Transforms a REST API formatted ACL object to our two-field mongo format.
93const transformObjectACL = ({ ACL, ...result }) => {
94 if (!ACL) {
95 return result;
96 }
97
98 result._wperm = [];
99 result._rperm = [];
100
101 for (const entry in ACL) {
102 if (ACL[entry].read) {
103 result._rperm.push(entry);
104 }
105 if (ACL[entry].write) {
106 result._wperm.push(entry);
107 }
108 }
109 return result;
110};
111
112const validateQuery = (
113 query: any,

Callers 2

updateMethod · 0.85
createMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…