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
{{ message }}
Repository navigation
Can not delete a data row with ACL(Using Role to check ACL) #1948
the parse-server version should be 2.2.11.
( in version 2.2.10, there aren't any cachedRoles codes in src/Auth.js:_loadRoles)
We also noticed the issue.
In our test cases, there's a test which creates a data and then delete it.
The data is created that only a certain Role can read/write.
when we updated the parse-server to version 2.2.11, the test fails.
The test is like:
consttestData=newforTest();constacl=newParse.ACL();acl.setRoleReadAccess('Admin',true);acl.setRoleWriteAccess('Admin',true);testData.set('number',1);testData.set('title','test');testData.set('ACL',acl);// where user is a Parse.User which has Admin RolereturntestData.save(null,{sessionToken: user.getSessionToken()}).then(()=>testData.destroy({sessionToken: user.getSessionToken()})).then(()=>{// done}).catch(err=>{// done.fail('create and drop fail: ' + err.code + ', ' + err.message );});
Activity
FarmerKing commentedon Jun 8, 2016
the parse-server version should be 2.2.11.
( in version 2.2.10, there aren't any
cachedRolescodes in src/Auth.js:_loadRoles)We also noticed the issue.
In our test cases, there's a test which creates a data and then delete it.
The data is created that only a certain Role can read/write.
when we updated the parse-server to version 2.2.11, the test fails.
The test is like:
we also traced the bug to these files: (just as @ntloc592's description)
https://github.com/ParsePlatform/parse-server/blob/2.2.11/src/rest.js#L64-L77
https://github.com/ParsePlatform/parse-server/blob/2.2.11/src/Auth.js#L97-L104
FarmerKing commentedon Jun 13, 2016
@ntloc592
Will be fixed in
#2034: fix getting user roles from cache