mirror of
https://github.com/lldap/lldap.git
synced 2026-07-25 17:58:44 +00:00
server: remove deprecated fields from CreateUserRequest
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 commit is contained in:
committed by
nitnelave
parent
37a683dcb2
commit
4c6cfeee9e
Generated
+25
-7
@@ -65,10 +65,19 @@ input CreateUserInput {
|
||||
id: String!
|
||||
email: String
|
||||
displayName: String
|
||||
firstName: String
|
||||
lastName: String
|
||||
"Base64 encoded JpegPhoto." avatar: String
|
||||
"User-defined attributes." attributes: [AttributeValueInput!]
|
||||
"""
|
||||
First name of user. Deprecated: use attribute instead.
|
||||
If both field and corresponding attribute is supplied, the attribute will take precedence.
|
||||
""" firstName: String
|
||||
"""
|
||||
Last name of user. Deprecated: use attribute instead.
|
||||
If both field and corresponding attribute is supplied, the attribute will take precedence.
|
||||
""" lastName: String
|
||||
"""
|
||||
Base64 encoded JpegPhoto. Deprecated: use attribute instead.
|
||||
If both field and corresponding attribute is supplied, the attribute will take precedence.
|
||||
""" avatar: String
|
||||
"Attributes." attributes: [AttributeValueInput!]
|
||||
}
|
||||
|
||||
type AttributeSchema {
|
||||
@@ -86,9 +95,18 @@ input UpdateUserInput {
|
||||
id: String!
|
||||
email: String
|
||||
displayName: String
|
||||
firstName: String
|
||||
lastName: String
|
||||
"Base64 encoded JpegPhoto." avatar: String
|
||||
"""
|
||||
First name of user. Deprecated: use attribute instead.
|
||||
If both field and corresponding attribute is supplied, the attribute will take precedence.
|
||||
""" firstName: String
|
||||
"""
|
||||
Last name of user. Deprecated: use attribute instead.
|
||||
If both field and corresponding attribute is supplied, the attribute will take precedence.
|
||||
""" lastName: String
|
||||
"""
|
||||
Base64 encoded JpegPhoto. Deprecated: use attribute instead.
|
||||
If both field and corresponding attribute is supplied, the attribute will take precedence.
|
||||
""" avatar: String
|
||||
"""
|
||||
Attribute names to remove.
|
||||
They are processed before insertions.
|
||||
|
||||
Reference in New Issue
Block a user