orionjs / orioncms

[Old] Orion is an open source framework built on Meteor that makes complex as well as simple apps possible with minimal effort.
http://orionjs.org
MIT License
715 stars 129 forks source link

Action "accounts.invite" is not defined #367

Open ghost opened 8 years ago

ghost commented 8 years ago

I need to let some user to invite some others. So I'm adding to my user-role

CommunityRole.allow('accounts.invite', true)

according to docs in roles v.1.6... but it raises the error

W20151130-11:17:02.261(1)? (STDERR) Action "accounts.invite" is not defined throw(ex); ^ W20151130-11:17:02.260(1)? (STDERR) ....dev_bundle\serverlib\node_modules\fibers\future.js:245

I've tried to google around but I did not find any clue. I suppose that it refers to an old version of roles... could you please let me understand what is the correct format on rev.2.0?

ghost commented 8 years ago

I receive the same message also for

CommunityRole.allow('accounts.indexFilter', function(){ return {}; });

...again "accounts.indexFilter" is not defined...

I've downloaded the blog example and added this line just to see if it would work with the original example.. but it doesn't.

nicolaslopezj commented 8 years ago

the indexFilter is not a action, its a helper:

CommunityRole.helper('accounts.indexFilter', function(){ return {}; });