Language: TypeScript
Label: vulnerable
CWE: CWE-284 \u2014 Improper Access Control
The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.

Code:
                                        user: User.email,
                                        expiresOn: moment
                                            .unix(Event.item.eventOn)
                                            .add(Event.item.eventDays, "days")
                                            .add(Event.item.eventHours, "hours")
                                            .unix(),
                                        maxAccounts: Event.item.maxAccounts,
                                        eventId: Event.item.id
                                    })
                                )
                            }
                            disabled={NotificationItem.visible}
                        >
                            Open AWS Console
                        </Button>
                        <AwsLoginModal />
                    </>
                )}
                <Alert
                    type={NotificationItem.type}
                    header={NotificationItem.header}
                    onDismiss={() => dispatch({ type: "notification/dismiss" })}
                    visible={NotificationItem.visible}
                    dismissAriaLabel="Close error"
                    dismissible
                >
                    {NotificationItem.content}
                </Alert>
            </SpaceBetween>
        </Container>