pub fn validate_clp(
raw: ParseMap,
schema: &ClassSchema,
opts: ClpValidation,
) -> Result<ClassLevelPermissions, ParseError>Expand description
Validate a CLP block against a class, and parse it.
The block is moved in and comes back inside the returned ClassLevelPermissions, which
keeps it verbatim. That is deliberate: a key parse-rust does not model must survive a round
trip through _metadata.class_permissions, or a parse-server node reading the same database
sees the key vanish.
schema supplies the field table for the existence checks. Pass the schema the block is
being stored against, meaning the new fields on a create and the merged fields on an update,
which is what upstream passes (SchemaController.js:1092, :1100).