4098 Update user name handling
Resolves #4098
Description
Type of change
- New feature (non-breaking change which adds functionality)
How Has This Been Tested?
I have tested using the user spec used for validating user-related activities. There I added a case when the user name is not filled in, it should be valid and also return the name "Name Not Provided" when accessing the method display_name.
This PR is ready for a first review.
Disclaimer: This PR contains a meaningful commit history where I tried to resolve solely the issue at hand, but when changing the user model breaking test logic appeared. So as a reviewer, I recommend you can follow the steps where I pass all tests with 2 additional file changes (1 in Rails Helper and 1 in an unrelated _spec file). Only with both changes, do all tests pass. Most likely there could be other ways to make all tests pass that could be more suitable.
The test that is not passing in the last commit is passing locally: