Skip to content

Commit

Permalink
[PWA-1089] Store Admins cant get to Order Tracking information (#4)
Browse files Browse the repository at this point in the history
* Whitelist -> Allowlist

* Use inclusive language and add shipping as default value

* Add flag to easily restore default value

Co-authored-by: Revanth Kumar Annavarapu <35203638+revanth0212@users.noreply.github.com>
  • Loading branch information
tjwiebell and revanth0212 committed Nov 24, 2020
1 parent fce51e9 commit b6a4a50
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _Use the absolute path on the server for the value of this configuration._

Example: `/app/node_modules/@magento/venia-concept/dist/upward.yml`

### Front Name Whitelist
### Front Name Allowlist

This configuration allows you to specify a line-separated list of routes to forward to the default Magento theme.

Expand Down
4 changes: 2 additions & 2 deletions Test/Unit/Magento/Framework/App/AreaListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public function afterGetCodeByFrontNameDataProvider()
return [
'Adminhtml area passes through' => ['adminhtml', '', 'adminhtml'],
'Frontend area w/o frontname goes to UPWARD' => ['frontend', '', 'pwa'],
'Frontend area w/o frontname in whitelist goes to UPWARD' => ['frontend', 'baz', 'pwa'],
'Frontend area with frontname in whitelist passes through' => ['frontend', 'foo', 'frontend']
'Frontend area w/o frontname in allow list goes to UPWARD' => ['frontend', 'baz', 'pwa'],
'Frontend area with frontname in allow list passes through' => ['frontend', 'foo', 'frontend']
];
}
}
4 changes: 2 additions & 2 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<config_path>web/upward/path</config_path>
<comment>Server path to YAML configuration file for UPWARD</comment>
</field>
<field id="front_names_to_skip" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="30" translate="label,comment" type="textarea">
<label>Front Name Whitelist</label>
<field id="front_names_to_skip" canRestore="1" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="30" translate="label,comment" type="textarea">
<label>Front Name Allowlist</label>
<comment>Line break separated list of URL's that will load the default Magento frontend.</comment>
</field>
<field id="prerender_enabled" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="40" translate="label,comment" type="select">
Expand Down
1 change: 1 addition & 0 deletions etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<default>
<web>
<upward>
<front_names_to_skip>shipping</front_names_to_skip>
<prerender_enabled>0</prerender_enabled>
<prerender_crawlers>
googlebot
Expand Down

0 comments on commit b6a4a50

Please sign in to comment.