Commit Graph

29 Commits

Author SHA1 Message Date
Toby f8cd7ad023 server, ldap: add support for Subschema requests (#1071)
Add a subschema entry to the rootDSE, which shows all attributes and
objectclasses present on the LLDAP server, which is needed for some
applications that need to index the LDAP server. The current
implementation's goal is to have a bare minimum working subschema which
follows the LDAP RFC. It also updates the GraphQL interface to follow
the changes that have been made in actually separating out
objectclasses, instead of having them as an attribute.

Co-authored-by: nitnelave <valentin@tolmer.fr>
2025-07-06 23:42:53 +02:00
Simon Broeng Jensen 4c6cfeee9e 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.
2025-02-05 15:42:06 +01:00
Valentin Tolmer 6cf0f6df06 server: map email and display_name from attributes into user fields 2024-08-28 00:25:23 +02:00
Valentin Tolmer b1384818d2 server: Add a is_readonly attribute to the schema 2024-08-27 23:04:24 +02:00
Valentin Tolmer 96f5b31e0c server: Add graphQL methods to manage custom LDAP object classes 2024-02-06 22:39:05 +01:00
Valentin Tolmer 646fe32645 server: Add support for custom LDAP object classes for users and groups 2024-02-05 22:51:02 +01:00
Valentin Tolmer e308a5e9a1 server: Add the attribute schema to the attributes in graphql
And make sure that we only request the schema once per top-level query
2024-01-21 23:25:57 +01:00
Valentin Tolmer c6ecf8d58a server: Add graphql support for setting attributes 2023-10-22 16:34:15 +02:00
Valentin Tolmer 439fde434b server: Add graphql support for creating/deleting attributes 2023-10-04 02:07:04 +02:00
Valentin Tolmer 034794d58d server: return user-defined attributes for groups in graphql
Part of #67
2023-09-14 13:02:45 +02:00
Valentin Tolmer e53ce92c96 server: return attributes in graphql
Progress for #67
2023-09-13 22:52:08 +02:00
Valentin Tolmer 31a8ba24a0 server,graphql: Add a GraphQL method to get the schema 2023-07-10 17:18:33 +02:00
Valentin Tolmer e89b1538af server,app: migrate to sea-orm 2022-11-25 15:35:48 +01:00
Valentin Tolmer 3acc448048 server: Add support for users' avatars in GrahpQL 2022-08-09 13:03:28 +02:00
Iván Izaguirre 5c584536b5 frontend: Add UUID and creation date
This exposes the new info in the GraphQL API, and adds it to the frontend.
2022-07-21 12:10:37 +02:00
Valentin Tolmer 35ee2834a3 graphql: Add a method to create a group 2021-10-15 08:05:50 +02:00
Valentin Tolmer 65780ae0fe graphql: Add a method to look up a group's details 2021-10-15 08:05:50 +02:00
Valentin Tolmer eb974e781c graphql: Add a filter by group 2021-09-28 13:50:56 +02:00
Valentin Tolmer c0d866b77b graphql: Add a method to update group details 2021-09-28 13:50:56 +02:00
Valentin Tolmer 3b70762b42 graphql: Add a method to delete a group 2021-09-28 13:50:56 +02:00
Valentin Tolmer e8831f607b graphql: Add a method to delete a user 2021-09-24 16:46:30 +02:00
Valentin Tolmer 480f48f820 graphql: Add a method to list groups 2021-09-20 11:23:57 +02:00
Valentin Tolmer e4d6b122c5 graphql: Add methods to add/remove group memberships 2021-09-20 11:23:57 +02:00
Valentin Tolmer 2954109d96 graphql: Add a method to update a user 2021-09-03 14:32:33 +02:00
Valentin Tolmer 0ac9e134de schema: make user fields non-nullable
They can always be empty. This simplifies mutation, since graphql_client
doesn't have an easy way to conditionally leave out fields (we could do
that with `@include`, but that's one bool per field in addition to the
field, a bit ugly).
2021-09-03 14:32:33 +02:00
Valentin Tolmer 459f1eba19 graphql: add an endpoint to create a user 2021-08-31 20:32:55 +02:00
Valentin Tolmer 0ecd9ed263 Migrate datetimes to UTC 2021-08-30 09:27:00 +02:00
Valentin Tolmer 848cc86d73 api: add the rest of the fields to User 2021-08-30 09:27:00 +02:00
Valentin Tolmer a08b9a556d cli: introduce the export_graphql_schema command
Split the command line into subcommands `run` and
`export_graphql_schema`.
2021-08-30 09:27:00 +02:00