Skip to content

Fix Limitation Role #5131 #5132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Oct 20, 2018
Merged

Conversation

Moumouls
Copy link
Member

Allow to manage Live Query on Role based Object for Parse.User that have more than 100 Parse.Role

Allow to manage Live Query with User that have more than 100 Parse.Roles
@codecov
Copy link

codecov bot commented Oct 19, 2018

Codecov Report

Merging #5132 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5132      +/-   ##
==========================================
+ Coverage   93.84%   93.84%   +<.01%     
==========================================
  Files         123      123              
  Lines        8923     8941      +18     
==========================================
+ Hits         8374     8391      +17     
- Misses        549      550       +1
Impacted Files Coverage Δ
src/Auth.js 100% <100%> (ø) ⬆️
src/RestQuery.js 96.11% <100%> (+0.13%) ⬆️
src/RestWrite.js 93.24% <0%> (-0.19%) ⬇️
...dapters/Storage/Postgres/PostgresStorageAdapter.js 97.08% <0%> (-0.09%) ⬇️
src/LiveQuery/ParseLiveQueryServer.js 87.46% <0%> (ø) ⬆️
src/Controllers/DatabaseController.js 94.93% <0%> (+0.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c692f07...d37e3cf. Read the comment docs.

@dplewis
Copy link
Member

dplewis commented Oct 19, 2018

@Moumouls You should use npm run lint before you commit to ensure your code passes es6 conventions and not get rejected by the CI

@Moumouls
Copy link
Member Author

@dplewis Got it, i'm currently learning how to do a clean PR for Parse Server :)

@dplewis
Copy link
Member

dplewis commented Oct 19, 2018

@Moumouls A few fixes from me and I'll give it another look through

dplewis
dplewis previously approved these changes Oct 19, 2018
@dplewis dplewis dismissed their stale review October 20, 2018 00:00

Sorry didn’t mean to approve. I’m on mobile

@Moumouls
Copy link
Member Author

@dplewis Auht.js is ok, now a test from ParseLiveQueryServer.js fail, but i really no idea why...

@dplewis
Copy link
Member

dplewis commented Oct 20, 2018

You have a lint issue too

@dplewis
Copy link
Member

dplewis commented Oct 20, 2018

@Moumouls you will need to mock .each as you aren’t using find anymore for that test

@Moumouls
Copy link
Member Author

That's what I thought! I am not yet very familiar with this type of unit tests

@Moumouls
Copy link
Member Author

What's the good way to mock the callbackof .each() ? @dplewis

      each(callback) {
          if (!shouldReturn) {
            return Promise.resolve();
          }
          //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();
        },

@flovilmart
Copy link
Contributor

You neee to ‘build’ with npm fun build or use npm run watch so it rebuild on each change

@flovilmart
Copy link
Contributor

@Moumouls I'll be pushing a PR soon to introduce a RestQuery.each method you'll be able to use. as more methods may need the same iteration treatment :)

flovilmart
flovilmart previously approved these changes Oct 20, 2018
@flovilmart flovilmart merged commit de79b70 into parse-community:master Oct 20, 2018
UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
…unity#5132)

* Fix Limitation Role parse-community#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants