Closed felixhamel closed 4 years ago
Hi there,
First, really great plugin 👍
Second, I think that we found a bug. If we pass undefined in the roles array, it already returns true. It makes sense in a way, but in another it's so easy to make a simple mistake and then all the permissions are broken.
Example :
Roles.userIsInRoles(Meteor.userId(), ["Role1", "Role2", undefined], "GroupName); // Always return true
If it's on purpose, then it's ok, but otherwise it might be a good idea to fix it.
I cannot reproduce this in v1 nor in v2.
See fa18a4f46a2cdc96752d4bbf91acd2ac2532c528 and 0978fdb52e8bc7dcadd52f4c5d9c2e48207da389.
Hi there,
First, really great plugin 👍
Second, I think that we found a bug. If we pass undefined in the roles array, it already returns true. It makes sense in a way, but in another it's so easy to make a simple mistake and then all the permissions are broken.
Example :
If it's on purpose, then it's ok, but otherwise it might be a good idea to fix it.