reactioncommerce/meteor-security

Question about more than one rule to the same collection

isAlmogK opened this issue · 4 comments

If I have the following rules setup and lets the first one pass but the second does not, does it stop the insert from happing? Or if just one passes it still runs?

Posts.permit('insert').ifLoggedIn().apply();
Posts.permit('insert').ifHasRole('admin').apply();

Rules within the same chain combine with AND. Multiple chains for the same collection combine with OR.

So to be clear with my example it would pass. How are rules with the same chain created?

See the new Logic section I added. Does that help clarify?

yes very clear now thanks