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:
    const submit = () => {
        dispatch({ type: "notification/dismiss" });
        if (!validateInputs(value)) {
            return;
        }
        dispatch(fetchEndUserEvent(value));
    };