Allow group argument in "ifHasRole" signature
jthomaschewski opened this issue · 1 comments
jthomaschewski commented
The "alanning:roles" package allows to check permission by group since version 1.1.0.
It would be great to be able to use the "userIsInRole(user, roles, group)" signature from meteor-security.
e.g:
Posts.permit('remove').ifHasRole('admin', 'company1.com').apply();
or even in array syntax:
Posts.permit('remove').ifHasRole(['admin', 'posts-admin'], 'company1.com').apply();
aldeed commented
Implemented with object arg since we only support a single arg. See updated docs: https://github.com/ongoworks/meteor-security#built-in-rule-chain-methods