Skip to content
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

Conflict with ongoworks:security package #49

Closed
ChenRoth-old opened this issue Mar 11, 2015 · 5 comments
Closed

Conflict with ongoworks:security package #49

ChenRoth-old opened this issue Mar 11, 2015 · 5 comments

Comments

@ChenRoth-old
Copy link

i've just added the mongol package, while having the security package in the project

the app crashes with this error:

Error: The collections argument must be a Mongo.Collection instance or an array of them
W20150311-11:02:18.428(2)? (STDERR)     at SecurityRuleConstructor.Security.Rule.collections (packages/ongoworks:security/security-api.js:45:1)
W20150311-11:02:18.428(2)? (STDERR)     at [object Object].Mongo.Collection.permit (packages/ongoworks:security/security-api.js:101:1)

this is caused when I'm trying to apply permissions to the Meteor users collection

any thoughts?

@JackAdams
Copy link
Contributor

I haven't reproduced this one yet, but then ... I haven't tried much more than adding the package and playing around with my .packages file. From what you've said, I'm guessing I'd also need to try applying permissions to the Meteor users collection to reproduce the error. I'm pretty sure this error is to do with the auto-detection of collections where Mongol wraps the Mongo.Collection API. Try putting ongoworks:security before/after msavin:mongol in the .packages file and see if that makes a difference. Let us know if it does.

@ChenRoth-old
Copy link
Author

putting msavin:mongol before security causes this error:

W20150311-15:54:24.012(2)? (STDERR) TypeError: Object [object Object] has no method 'permit'
W20150311-15:54:24.012(2)? (STDERR)     at app/server/permissions.js:20:7
W20150311-15:54:24.012(2)? (STDERR)     at app/server/permissions.js:25:3

where the referenced line is something along:

Meteor.users.permit('update').exceptProps( *redacted* ).apply();

so this would be a simple reproduction to work with

@JackAdams
Copy link
Contributor

Thanks @ChenRoth I'll take another look tonight, but this is a tricky one if it produces an error for both configurations of the packages (relative to each other) in the .packages files.

@msavin msavin changed the title trouble with ongoworks:security package Conflict with ongoworks:security package Jun 2, 2015
@rclai
Copy link

rclai commented Jun 22, 2015

Does .permit() only not exist on Meteor.users?

@msavin
Copy link
Owner

msavin commented Sep 29, 2015

Going to close this since its not really an issue with Mongol

@msavin msavin closed this as completed Sep 29, 2015
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

No branches or pull requests

4 participants