Ensure all roles are properly loaded #5131 (#5132)

* Fix Limitation Role #5131

Allow to manage Live Query with User that have more than 100 Parse.Roles

* Clean Up

* Add Custom Config Support and Test

* Fix Auth Test

* Switch to Async Function

* Fix restWhere

* Fix Test

* Clean Final Commit

* Lint Fix

* Need to Fix Test Callback

* Fixes broken test

* Restore find() method in spy

* adds restquery-each

* small nit

* adds changelog
This commit is contained in:
Antoine Cormouls
2018-10-20 22:45:23 +02:00
committed by Florent Vilmart
parent aa9580e59c
commit de79b70cbc
6 changed files with 157 additions and 34 deletions

View File

@@ -1307,6 +1307,16 @@ describe('ParseLiveQueryServer', function() {
liveQueryRole.id = 'abcdef1234';
return Promise.resolve([liveQueryRole]);
},
each(callback) {
//Return a role with the name "liveQueryRead" as that is what was set on the ACL
const liveQueryRole = new Parse.Role(
'liveQueryRead',
new Parse.ACL()
);
liveQueryRole.id = 'abcdef1234';
callback(liveQueryRole)
return Promise.resolve();
},
};
});
@@ -1316,13 +1326,6 @@ describe('ParseLiveQueryServer', function() {
expect(isMatched).toBe(true);
done();
});
parseLiveQueryServer
._matchesACL(acl, client, requestId)
.then(function(isMatched) {
expect(isMatched).toBe(true);
done();
});
});
describe('class level permissions', () => {