These are chat archives for reactioncommerce/reaction
Hi @aaronjudd I am still going through the functionality changes and I am stuck again, I found your hasPermission function which uses the
hasPermission: (permissions) -> # shop specific check if Roles.userIsInRole Meteor.userId(), permissions, @getShopId() return true # global roles check if Roles.userIsInRole Meteor.userId(), permissions, Roles.GLOBAL_GROUP return true
But what happens if I am a seller of a shop, I have the createProduct role added for that particular shop and I want to insert a product there? I will get throuwn back because of the permission check in the createProduct function
unless ReactionCore.hasPermission('createProduct') throw new Meteor.Error 403, "Access Denied"
although I have the permission for the shop I am about the insert the product.
if Roles.userIsInRole Meteor.userId(), permissions, sellerShopId
__GLOBAL_ROLES__entry in the roles collection, but are filtered out of the resulting publication so that you only see the shop entries
domain: currentDomain- so it might not be that method, but somewhere in there it should be
domainor selected shop