reactioncommerce/meteor-security

vsivsi:file-collection compatibility

nickredmark opened this issue · 1 comments

I use the file package https://atmospherejs.com/vsivsi/file-collection

For some reason using ongoworks security doesn't work with that collection.

@Files = new FileCollection 'files',
    resumable: true
    http: [
        method: 'get'
        path: '/:md5'
        lookup: (params, query) ->
            md5: params.md5
    ]

Files.permit(['insert']).apply()

generates the error

Error: [Unrecognized allow rule type 'transform'.]
at FileCollection.allow (packages/vsivsi:file-collection/src/gridFS_server.coffee:147:26)
at packages/ongoworks:security/security-util.js:39:1
...

It seems that avoiding to set transform: null would solve the issue.

This should be submitted as an issue in the vsivsi:file-collection repo. It does not implement the full allow/deny options spec.