These are chat archives for reactioncommerce/reaction

Dec 2016
Lorenzo Campanis
Dec 03 2016 11:58

Correct me if I'm wrong but I think we need to generalise two core functions:
Reaction.addRolesToVisitors(String route)
In we can simplify the process of creating new package routes
Forget about this completely

function addRolesToVisitors() {
  // Add the about permission to all default roles since it's available to all

and simply do

 * Hook to make additional configuration changes
Hooks.Events.add("afterCoreInit", () => {
// @param route can be any role not just a route
 Reaction.addRolesToVisitors(String route);

Secondly, isPackageEnabled seems to be repeating itself between packages, so maybe we can introduce
Reaction.isPackageEnabled(String packageName)