You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Saving ACL from JSON throws ACL must be a Parse.ACL error. The validation on ACL prevents the json from properly encoding. This may also fix the issue #2028
Steps to reproduce
it('can set ACL from json', async () => {
Parse.User.enableUnsafeCurrentUser();
const user = new Parse.User();
const object = new TestObject();
user.set('username', 'torn');
user.set('password', 'acl');
await user.signUp();
const acl = new Parse.ACL(user);
object.setACL(acl);
const json = object.toJSON();
await object.save(json); // This breaks ACL must be a Parse.ACL.
assert.equal(acl.equals(object.getACL()), true);
});
This error also happens when on object.set({ ACL: acl.toJSON() });
Actual Outcome
Throws error
Expected Outcome
Should save object properly
Environment
Server
Parse Server version: 6.0.0
Operating system: MacOS
Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local
Database
System (MongoDB or Postgres): MongoDB
Database version: 4.4
Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local
Client
Parse JS SDK version: 4.3.1
Logs
The text was updated successfully, but these errors were encountered:
🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
New Issue Checklist
Issue Description
Saving ACL from JSON throws
ACL must be a Parse.ACL
error. The validation on ACL prevents the json from properly encoding. This may also fix the issue #2028Steps to reproduce
This error also happens when on
object.set({ ACL: acl.toJSON() })
;Actual Outcome
Throws error
Expected Outcome
Should save object properly
Environment
Server
6.0.0
MacOS
local
Database
MongoDB
4.4
local
Client
4.3.1
Logs
The text was updated successfully, but these errors were encountered: