diff --git a/imports/plugins/core/accounts/register.js b/imports/plugins/core/accounts/register.js index e39215d81e4..ee19aab7a0d 100644 --- a/imports/plugins/core/accounts/register.js +++ b/imports/plugins/core/accounts/register.js @@ -70,7 +70,7 @@ Reaction.registerPackage({ template: "loginFormUpdatePassword", workflow: "none", meta: { noAdminControls: true }, - name: "Reset Password", + name: "reset-password", label: "reset-password" }], layout: [{ diff --git a/imports/plugins/core/accounts/server/init.js b/imports/plugins/core/accounts/server/init.js index 2b0f557796f..7662e5523cd 100644 --- a/imports/plugins/core/accounts/server/init.js +++ b/imports/plugins/core/accounts/server/init.js @@ -16,6 +16,6 @@ Hooks.Events.add("afterCoreInit", () => { Reaction.addRolesToGroups({ allShops: true, groups: ["guest", "customer"], - roles: ["account/verify"] + roles: ["account/verify", "reset-password"] }); }); diff --git a/imports/plugins/core/versions/server/migrations/53_update_password_registry_route_name.js b/imports/plugins/core/versions/server/migrations/53_update_password_registry_route_name.js new file mode 100644 index 00000000000..e899d8e10e0 --- /dev/null +++ b/imports/plugins/core/versions/server/migrations/53_update_password_registry_route_name.js @@ -0,0 +1,26 @@ +import { Migrations } from "meteor/percolate:migrations"; +import { Packages } from "/lib/collections"; + +Migrations.add({ + version: 53, + up() { + Packages.update({ + "name": "reaction-accounts", + "registry.name": "Reset Password" + }, { + $set: { + "registry.$.name": "reset-password" + } + }, { multi: true }); + }, + down() { + Packages.update({ + "name": "reaction-accounts", + "registry.name": "reset-password" + }, { + $set: { + "registry.$.name": "Reset Password" + } + }, { multi: true }); + } +}); diff --git a/imports/plugins/core/versions/server/migrations/index.js b/imports/plugins/core/versions/server/migrations/index.js index ab65fcea010..4600b97d3de 100644 --- a/imports/plugins/core/versions/server/migrations/index.js +++ b/imports/plugins/core/versions/server/migrations/index.js @@ -51,3 +51,4 @@ import "./49_update_idp_route_name_to_match_pattern"; import "./50_create_default_navigation_trees"; import "./51_catalog_variant_inventory"; import "./52_change_activetaxfield_to_primary"; +import "./53_update_password_registry_route_name";