Skip to content

Move acl adding into parse server #1601

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

Conversation

drew-gross
Copy link
Contributor

DB adapters shouldn't know what an ACL is.

@codecov-io
Copy link

Current coverage is 92.81%

Merging #1601 into master will increase coverage by +0.01% as of de0910e

@@            master   #1601   diff @@
======================================
  Files           87      87       
  Stmts         5534    5543     +9
  Branches      1053    1055     +2
  Methods          0       0       
======================================
+ Hit           5136    5145     +9
+ Partial         14      13     -1
- Missed         384     385     +1

Review entire Coverage Diff as of de0910e

Powered by Codecov. Updated on successful CI builds.

function addWriteACL(mongoWhere, acl) {
return {'$and': [mongoWhere, {"_wperm" : { "$in" : [null, ...acl]}}]};
}

function addReadACL(mongoWhere, acl) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be removed too as you copied it into DBController

@facebook-github-bot
Copy link

@drew-gross updated the pull request.


var mongodb = require('mongodb');
var Parse = require('parse/node').Parse;

var SchemaController = require('../Controllers/SchemaController');
const deepcopy = require('deepcopy');

function addWriteACL(query, acl) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name is somehow misleading, as we do a deepCopy and return a new object, but I believe that's ok.

@flovilmart flovilmart merged commit d14d451 into parse-community:master Apr 23, 2016
@drew-gross drew-gross deleted the move-acl-adding-into-parse-server branch April 23, 2016 23:27
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.

4 participants