Passing postgres test with user
This commit is contained in:
@@ -410,7 +410,7 @@ DatabaseController.prototype.create = function(className, object, { acl } = {})
|
||||
.then(() => this.handleRelationUpdates(className, null, object))
|
||||
.then(() => schemaController.enforceClassExists(className))
|
||||
.then(() => schemaController.getOneSchema(className, true))
|
||||
.then(schema => this.adapter.createObject(className, schema, object))
|
||||
.then(schema => this.adapter.createObject(className, SchemaController.convertSchemaToAdapterSchema(schema), object))
|
||||
.then(result => sanitizeDatabaseResult(originalObject, result.ops[0]));
|
||||
})
|
||||
};
|
||||
|
||||
@@ -223,6 +223,8 @@ const fieldTypeIsInvalid = ({ type, targetClass }) => {
|
||||
const convertSchemaToAdapterSchema = schema => {
|
||||
schema = injectDefaultSchema(schema);
|
||||
delete schema.fields.ACL;
|
||||
schema.fields._rperm = { type: 'Array' };
|
||||
schema.fields._wperm = { type: 'Array' };
|
||||
|
||||
if (schema.className === '_User') {
|
||||
delete schema.fields.password;
|
||||
@@ -837,4 +839,5 @@ export {
|
||||
buildMergedSchemaObject,
|
||||
systemClasses,
|
||||
defaultColumns,
|
||||
convertSchemaToAdapterSchema,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user