-
Notifications
You must be signed in to change notification settings - Fork 29
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
Store permission don't work as in doc #95
Comments
Thanks, but i get another error in server when i upload using the permission :
In fact, after search in js, |
@maxwarch, currently there is a problem I need to fix with the upload pattern design. Iam sorry I could not fix that yesterday but since there was really an issue with the permissions not checked I deployed a partial fix, I'll try to finish the fix ASAP. You could replace your update check by this one as a temporary fix : update: function (userId, doc) {
// Allow updates only if user is unknown and doc uploading or user is owner
return (!userId && !doc.complete) || userId === doc.userId;
}, Merci de votre patience ;-) |
Thank you, are you french ?? ;) |
@maxwarch @jalik Hi, confirm the problem and would like to add some details, maybe they could be helpful. I got absolutely the same error messages when trying to upload files. I use GridFSStore. A record about a file appears in the file collection (e.g., permissions: new UploadFS.StorePermissions({
...
update: function (userId, doc) {
return (userId && userId === doc.userId);
},
...
}), |
@maxwarch, je suis de Polynésie française, donc oui je suis Français ;) @seabrus @maxwarch, I think the problem is now fixed, you can use permissions as normally, some permission checks were done because of the update hook on the collection in a context where the userId was not known.. so updates during the upload are not throwing exceptions anymore. By the way I forgot to add the token verification during upload (my bad), it's now fixed ! so it's more secure than before (if you're concerned about this). |
@jalik Ah d'accord ! J'image que tu tu ne dois pas être loin de la mer, pour travailler c'est plus sympa ;) I think that i don't have these errors before your first fix v0.7.0_2, i will try this version to be sure. Sorry to reopen again this issue ;) |
@maxwarch what about your last message ? can you confirm that it's related to UploadFS or GridFS store ? |
Sorry for my late answer.
And when i comment these lines, it works without errors. Thanks. |
Hi,
i follow the doc to set permission to the store :
This work even when the user is not loggin.
So, to prevent user's upload when he's not login, i must do this
This work and block the user.
Can you confirm this ?
Thanks for your support.
The text was updated successfully, but these errors were encountered: