Skip to content

Commit

Permalink
fix: Add enrollAccount role for users
Browse files Browse the repository at this point in the history
  • Loading branch information
impactmass committed Jan 16, 2019
1 parent 6107222 commit d843d60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imports/plugins/core/accounts/server/init.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Hooks from "@reactioncommerce/hooks";
import Reaction from "/imports/plugins/core/core/server/Reaction";
import { Accounts, Groups } from "/lib/collections";
import { ENROLL_URI_BASE } from "./util/getDataForEmail";

// set default admin user's account as "owner"
Hooks.Events.add("afterCreateDefaultAdminUser", (user) => {
Expand All @@ -16,6 +17,6 @@ Hooks.Events.add("afterCoreInit", () => {
Reaction.addRolesToGroups({
allShops: true,
groups: ["guest", "customer"],
roles: ["account/verify", "reset-password"]
roles: ["account/verify", "reset-password", ENROLL_URI_BASE]
});
});

0 comments on commit d843d60

Please sign in to comment.