Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 90e2298

Browse files
mabreuortegaMiguel Abreu
andauthored
Miguel.abreu/gtt 1957 show 403 page for public user on admin (#849)
* feat: redirect public user to 403 page when land on admin side * feat: restore working versions * fix: use setInterval for sign out handler * feat: remove dev console log * fix: update snapshots * fix: add denis to codeowners file. Co-authored-by: Miguel Abreu <miabreu@amazon.com>
1 parent 2c83e54 commit 90e2298

File tree

16 files changed

+5898
-5078
lines changed

16 files changed

+5898
-5078
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @trietlu @mabreuortega @mazenkh-amazon
1+
* @trietlu @mabreuortega @mazenkh-amazon @denisquesada

buildspec.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ phases:
1515
pre_build:
1616
commands:
1717
- ./test.sh
18-
19-
post_build:
20-
commands:
2118
- ./install.sh --production
2219

2320
build:

frontend/package-lock.json

Lines changed: 5836 additions & 4956 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/components/Shareable.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ function Shareable(props: Props) {
5353

5454
function copyWidgetUrlToClipboard(event: MouseEvent) {
5555
navigator.clipboard.writeText(getWidgetUrl());
56-
console.log(window.location.href);
57-
console.log(window.location.href.replace(window.location.hash, ""));
5856
history.replace(window.location.pathname, {
5957
alert: {
6058
type: "success",

frontend/src/components/Tabs.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ function Tabs(props: Props) {
5151
}
5252

5353
const onKeyDown = (e: KeyboardEvent<HTMLElement>) => {
54-
console.log(e.key);
5554
if (e.key === "ArrowRight") {
5655
const index = getActiveTabIndex();
5756
if (index < tabsMap.size - 1) {

frontend/src/components/TabsVertical.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function TabsVertical(props: Props) {
2828
}
2929

3030
const onKeyDown = (e: KeyboardEvent<HTMLElement>) => {
31-
console.log(e.key);
3231
if (e.key === "ArrowDown") {
3332
const index = getActiveTabIndex();
3433
if (index < tabsMap.size - 1) {

frontend/src/components/__tests__/__snapshots__/Combobox.test.tsx.snap

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ exports[`renders a combobox 1`] = `
4141
</select>
4242
<input
4343
aria-autocomplete="list"
44-
aria-controls="1--list"
4544
aria-describedby="1--assistiveHint"
4645
aria-expanded="false"
4746
aria-owns="1--list"
@@ -52,8 +51,6 @@ exports[`renders a combobox 1`] = `
5251
role="combobox"
5352
type="text"
5453
/>
55-
56-
5754
<span
5855
class="usa-combo-box__clear-input__wrapper"
5956
tabindex="-1"
@@ -70,15 +67,11 @@ exports[`renders a combobox 1`] = `
7067
7168
7269
</span>
73-
74-
7570
<span
7671
class="usa-combo-box__input-button-separator"
7772
>
7873
 
7974
</span>
80-
81-
8275
<span
8376
class="usa-combo-box__toggle-list__wrapper"
8477
tabindex="-1"
@@ -96,8 +89,6 @@ exports[`renders a combobox 1`] = `
9689
9790
9891
</span>
99-
100-
10192
<ul
10293
aria-labelledby="1-label"
10394
class="usa-combo-box__list"
@@ -109,14 +100,10 @@ exports[`renders a combobox 1`] = `
109100
110101
111102
</ul>
112-
113-
114103
<div
115104
class="usa-combo-box__status usa-sr-only"
116105
role="status"
117106
/>
118-
119-
120107
<span
121108
class="usa-sr-only"
122109
id="1--assistiveHint"
@@ -179,7 +166,6 @@ exports[`shows an error message 1`] = `
179166
</select>
180167
<input
181168
aria-autocomplete="list"
182-
aria-controls="1--list"
183169
aria-describedby="1--assistiveHint"
184170
aria-expanded="false"
185171
aria-owns="1--list"
@@ -190,8 +176,6 @@ exports[`shows an error message 1`] = `
190176
role="combobox"
191177
type="text"
192178
/>
193-
194-
195179
<span
196180
class="usa-combo-box__clear-input__wrapper"
197181
tabindex="-1"
@@ -208,15 +192,11 @@ exports[`shows an error message 1`] = `
208192
209193
210194
</span>
211-
212-
213195
<span
214196
class="usa-combo-box__input-button-separator"
215197
>
216198
 
217199
</span>
218-
219-
220200
<span
221201
class="usa-combo-box__toggle-list__wrapper"
222202
tabindex="-1"
@@ -234,8 +214,6 @@ exports[`shows an error message 1`] = `
234214
235215
236216
</span>
237-
238-
239217
<ul
240218
aria-labelledby="1-label"
241219
class="usa-combo-box__list"
@@ -247,14 +225,10 @@ exports[`shows an error message 1`] = `
247225
248226
249227
</ul>
250-
251-
252228
<div
253229
class="usa-combo-box__status usa-sr-only"
254230
role="status"
255231
/>
256-
257-
258232
<span
259233
class="usa-sr-only"
260234
id="1--assistiveHint"

frontend/src/components/__tests__/__snapshots__/Modal.test.tsx.snap

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ exports[`renders a create draft type Modal 1`] = `
1919
class="ReactModalPortal"
2020
>
2121
<div
22-
class="ReactModal__Overlay overlay"
22+
class="ReactModal__Overlay ReactModal__Overlay--after-open overlay"
2323
>
2424
<div
2525
aria-describedby="message"
2626
aria-labelledby="title"
2727
aria-modal="true"
28-
class="ReactModal__Content modal"
28+
class="ReactModal__Content ReactModal__Content--after-open modal"
2929
role="dialog"
3030
tabindex="-1"
3131
>
@@ -114,13 +114,13 @@ exports[`renders a delete type Modal 1`] = `
114114
class="ReactModalPortal"
115115
>
116116
<div
117-
class="ReactModal__Overlay overlay"
117+
class="ReactModal__Overlay ReactModal__Overlay--after-open overlay"
118118
>
119119
<div
120120
aria-describedby="message"
121121
aria-labelledby="title"
122122
aria-modal="true"
123-
class="ReactModal__Content modal"
123+
class="ReactModal__Content ReactModal__Content--after-open modal"
124124
role="dialog"
125125
tabindex="-1"
126126
>
@@ -209,13 +209,13 @@ exports[`renders a publish type Modal 1`] = `
209209
class="ReactModalPortal"
210210
>
211211
<div
212-
class="ReactModal__Overlay overlay"
212+
class="ReactModal__Overlay ReactModal__Overlay--after-open overlay"
213213
>
214214
<div
215215
aria-describedby="message"
216216
aria-labelledby="title"
217217
aria-modal="true"
218-
class="ReactModal__Content modal"
218+
class="ReactModal__Content ReactModal__Content--after-open modal"
219219
role="dialog"
220220
tabindex="-1"
221221
>
@@ -304,13 +304,13 @@ exports[`renders a re-publish type Modal 1`] = `
304304
class="ReactModalPortal"
305305
>
306306
<div
307-
class="ReactModal__Overlay overlay"
307+
class="ReactModal__Overlay ReactModal__Overlay--after-open overlay"
308308
>
309309
<div
310310
aria-describedby="message"
311311
aria-labelledby="title"
312312
aria-modal="true"
313-
class="ReactModal__Content modal"
313+
class="ReactModal__Content ReactModal__Content--after-open modal"
314314
role="dialog"
315315
tabindex="-1"
316316
>
@@ -399,13 +399,13 @@ exports[`renders an archive type Modal 1`] = `
399399
class="ReactModalPortal"
400400
>
401401
<div
402-
class="ReactModal__Overlay overlay"
402+
class="ReactModal__Overlay ReactModal__Overlay--after-open overlay"
403403
>
404404
<div
405405
aria-describedby="message"
406406
aria-labelledby="title"
407407
aria-modal="true"
408-
class="ReactModal__Content modal"
408+
class="ReactModal__Content ReactModal__Content--after-open modal"
409409
role="dialog"
410410
tabindex="-1"
411411
>

frontend/src/components/__tests__/__snapshots__/Tabs.test.tsx.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ exports[`Tabs tests renders the Tabs component 1`] = `
1010
class="react-horizontal-scrolling-menu--wrapper border-base-lighter border-bottom margin-top-1"
1111
>
1212
<div
13-
class="react-horizontal-scrolling-menu--scroll-container "
13+
class="react-horizontal-scrolling-menu--scroll-container"
1414
>
1515
<div
16-
class="react-horizontal-scrolling-menu--item "
16+
class="react-horizontal-scrolling-menu--item"
1717
data-index="0"
1818
data-key="tab1"
1919
>
@@ -28,12 +28,12 @@ exports[`Tabs tests renders the Tabs component 1`] = `
2828
</div>
2929
</div>
3030
<div
31-
class="react-horizontal-scrolling-menu--separator "
31+
class="react-horizontal-scrolling-menu--separator"
3232
data-index="0.1"
3333
data-key="tab1-separator"
3434
/>
3535
<div
36-
class="react-horizontal-scrolling-menu--item "
36+
class="react-horizontal-scrolling-menu--item"
3737
data-index="1"
3838
data-key="tab2"
3939
>
@@ -69,10 +69,10 @@ exports[`Tabs tests renders the Tabs component with default tab 2 selected 1`] =
6969
class="react-horizontal-scrolling-menu--wrapper border-base-lighter border-bottom margin-top-1"
7070
>
7171
<div
72-
class="react-horizontal-scrolling-menu--scroll-container "
72+
class="react-horizontal-scrolling-menu--scroll-container"
7373
>
7474
<div
75-
class="react-horizontal-scrolling-menu--item "
75+
class="react-horizontal-scrolling-menu--item"
7676
data-index="0"
7777
data-key="tab1"
7878
>
@@ -87,12 +87,12 @@ exports[`Tabs tests renders the Tabs component with default tab 2 selected 1`] =
8787
</div>
8888
</div>
8989
<div
90-
class="react-horizontal-scrolling-menu--separator "
90+
class="react-horizontal-scrolling-menu--separator"
9191
data-index="0.1"
9292
data-key="tab1-separator"
9393
/>
9494
<div
95-
class="react-horizontal-scrolling-menu--item "
95+
class="react-horizontal-scrolling-menu--item"
9696
data-index="1"
9797
data-key="tab2"
9898
>

frontend/src/components/__tests__/__snapshots__/Tooltip.test.tsx.snap

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ exports[`renders a tooltip at the bottom 1`] = `
77
data-id="tooltip"
88
id="test"
99
>
10-
<style
11-
aria-hidden="true"
12-
>
10+
<style>
1311
1412
.test {
1513
color: #fff;
@@ -97,9 +95,7 @@ exports[`renders a tooltip at the left 1`] = `
9795
data-id="tooltip"
9896
id="test"
9997
>
100-
<style
101-
aria-hidden="true"
102-
>
98+
<style>
10399
104100
.test {
105101
color: #fff;
@@ -187,9 +183,7 @@ exports[`renders a tooltip at the right 1`] = `
187183
data-id="tooltip"
188184
id="test"
189185
>
190-
<style
191-
aria-hidden="true"
192-
>
186+
<style>
193187
194188
.test {
195189
color: #fff;
@@ -277,9 +271,7 @@ exports[`renders a tooltip at the top (default) 1`] = `
277271
data-id="tooltip"
278272
id="test"
279273
>
280-
<style
281-
aria-hidden="true"
282-
>
274+
<style>
283275
284276
.test {
285277
color: #fff;

0 commit comments

Comments
 (0)