[PR #1099] [MERGED] server: remove deprecated fields from CreateUserRequest #1118

Closed
opened 2026-02-27 09:10:58 +03:00 by kerem · 0 comments
Owner

📋 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: mainHead: rem-deprecated-fields


📝 Commits (1)

  • dfce0fa server: 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.

## 📋 Pull Request Information **Original PR:** https://github.com/lldap/lldap/pull/1099 **Author:** [@broeng](https://github.com/broeng) **Created:** 2/4/2025 **Status:** ✅ Merged **Merged:** 2/5/2025 **Merged by:** [@nitnelave](https://github.com/nitnelave) **Base:** `main` ← **Head:** `rem-deprecated-fields` --- ### 📝 Commits (1) - [`dfce0fa`](https://github.com/lldap/lldap/commit/dfce0fa3e3fd9e090ffc795a14f09036666b02f5) server: remove deprecated fields from CreateUserRequest ### 📊 Changes **6 files changed** (+303 additions, -129 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 09:10:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#1118
No description provided.