mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 16:25:55 +03:00
[GH-ISSUE #387] Cannot create user without a Display Name but there is no validation in frontend #150
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#150
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Moovlin on GitHub (Dec 1, 2022).
Original GitHub issue: https://github.com/lldap/lldap/issues/387
It seems that there is a change in requirement where the display name for a new user must be included. Based on the front end, this seems to be a non required field which in turns causes an error on the back end.
I'm under the impression that this should be optional and was in previous versions but with the change of the ORM, this seems to have caused a constraint issue. If I compare this to a field which is marked as required, it seems the front end does that validation before I am able to submit the form.

Due to this difference, I think the regression lies in the model but if it makes more sense to require a display name that works for me as well. I would be happy to work on this. As a side thought, this issue, along with the other related issue related to the switch to the ORM, may be fuel for a discussion of adding unit tests but that discussion is likely out of scope for this issue.
@Moovlin commented on GitHub (Dec 1, 2022):
Since I offered to work on this, I figured it'd be best to quickly summarize the conversation I had with @nitnelave on Discord.
The process towards resolution will roughly be as follows:
types.rsfile for thedisplay_namefield in theUserstruct to allow for us to leverage the ORM to handle the conversion fromNone<->"".UserIdis an example of such a type.