mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 16:25:55 +03:00
[PR #1099] [MERGED] server: remove deprecated fields from CreateUserRequest #1118
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#1118
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?
📋 Pull Request Information
Original PR: https://github.com/lldap/lldap/pull/1099
Author: @broeng
Created: 2/4/2025
Status: ✅ Merged
Merged: 2/5/2025
Merged by: @nitnelave
Base:
main← Head:rem-deprecated-fields📝 Commits (1)
dfce0faserver: remove deprecated fields from CreateUserRequest📊 Changes
6 files changed (+303 additions, -129 deletions)
View changed files
📝
crates/domain/src/requests.rs(+1 -7)📝
schema.graphql(+25 -7)📝
server/src/domain/sql_backend_handler.rs(+11 -4)📝
server/src/domain/sql_user_backend_handler.rs(+43 -62)📝
server/src/infra/graphql/mutation.rs(+187 -36)📝
server/src/infra/ldap_handler.rs(+36 -13)📄 Description
The fields first_name, last_name, and avatar have all been moved to regular attributes in the database, and are available through the GraphQL API as such as well. This commit removes the legacy fields for each on the internal CreateUserRequest type, leaving these to only be updateable through attributes.
The fields are still available in the GraphQL CreateUserInput type, preserving backwards compatiblity, and if set, they will be used for the corresponding attribute values. If both fields and attributes are set, the values given through attributes will superceed the fields, and be used. This change also fixes a bug, where creation of a user would fail if either of these attributes were set as both attribute and field, as it would attempt to insert the attribute twice, violating a unique constraint in the database.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.