fides icon indicating copy to clipboard operation
fides copied to clipboard

Inconsistent Validation Rules Between Admin UI and Web Server for User Creation

Open RobertKeyser opened this issue 2 years ago • 1 comments

Bug Description

When creating a new user and you try to add a space, the Admin UI allows you to submit the request to the web server, receives a 422 stating that spaces are not allowed in the username; however, it then never displays an error message or toast indicating that it was unsuccessful.

image

Steps to Reproduce

  • Open the network tab of your browser's
  • Try to create a new user in the admin UI with a valid password but the username bad user
  • Click save
  • Receive a 422 from the API call
  • No feedback in the admin ui that the request was unsuccessful.

Expected behavior

A few things:

  • The front end should validate that the username conforms to Fides's expectations.
    • If the user inputs an invalid username, they field should be marked as invalid and the save button should be disabled
  • The error from the backend was not displayed to the user via a toast or other error message. This leaves the user in an indeterminate state, not knowing whether their action was successful or why it was unsuccessful.

Environment

  • Version: Tested on 2.14+
  • OS:
  • Python Version:
  • Docker Version:

Additional context

Add any other context about the problem here.

RobertKeyser avatar Jun 12 '23 20:06 RobertKeyser