nicolaslopezj / roles

The most advanced roles package for meteor
MIT License
87 stars 13 forks source link

Can't see documents / no subscriptions #26

Closed jannikkeye closed 7 years ago

jannikkeye commented 7 years ago

When I create a new role and then create an account with that role I can't see documents in my table.

I run this in client code:

const moderator = new Roles.Role('moderator');

moderator.allow('collections.alumni.index', true);
moderator.allow('collections.alumni.insert', true);
moderator.allow('collections.alumni.update', true);
moderator.allow('collections.alumni.remove', true);
moderator.allow('collections.alumni.showCreate', true);
moderator.allow('collections.alumni.showUpdate', true);
moderator.allow('collections.alumni.showRemove', true);
moderator.helper('collections.alumni.indexFilter', {});

Hiding/showing disallowing stuff works but I can't see any documents in my tables. There are no subscriptions apparently.

Hope someone can help.

nicolaslopezj commented 7 years ago

Is this code in client and server?

jannikkeye commented 7 years ago

Ah, okay I see. It was only in client. Everything except the indexFilter helper belongs in client code? It works like this but I declare the role once on client and once on server. Where is the best place to but the code bits?

nicolaslopezj commented 7 years ago

It's best to put all roles rules in client and server