Valentin Tolmer
b1384818d2
server: Add a is_readonly attribute to the schema
2024-08-27 23:04:24 +02:00
Bojidar Marinov
049a360506
server: Lookup first_name/last_name in the right list of attributes ( #943 )
...
Note the std::mem::take(&mut user.attributes) further up that zeroes out user.attributes
2024-07-31 23:55:07 +02: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
bd0a58b476
server: clean up the attributes, relax the substring filter conditions
...
This consolidates both user and group attributes in their map_{user,group}_attribute as the only point of parsing. It adds support for custom attribute filters for groups, and makes a SubString filter on an unknown attribute resolve to just false.
2024-01-17 23:44:25 +01:00
Valentin Tolmer
c4be7f5b6f
server: Serialize attribute values when searching
...
This should fix #763 and allow filtering by custom attribute values.
2024-01-13 13:37:46 +01:00
Valentin Tolmer
272c84c574
server: make attributes names, group names and emails case insensitive
...
In addition, group names and emails keep their casing
2023-12-15 23:21:22 +01:00
Valentin Tolmer
1fddd87470
server: Simplify RequestFilter's TryInto
2023-10-30 11:31:04 +01:00
Valentin Tolmer
439fde434b
server: Add graphql support for creating/deleting attributes
2023-10-04 02:07:04 +02:00
Valentin Tolmer
93e9985a81
server: rename SchemaBackendHandler -> ReadSchemaBackendHandler
2023-09-29 02:31:20 +02:00
Valentin Tolmer
39a75b2c35
server: read custom attributes from LDAP
2023-09-15 15:26:18 +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
134796aa9f
server: Switch tests to pretty_assertions
2023-09-10 22:29:32 +02:00
Valentin Tolmer
e5bc06a617
graphql: sort the groups before returning them
2023-07-29 11:27:50 +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
3140af63de
server: Use schema to populate attributes
2023-06-29 11:11:20 +02:00
Valentin Tolmer
70146e0b70
server: prepare DB schema for user attributes
...
First step of #67 .
2023-06-14 23:20:37 +02:00
Valentin Tolmer
d18cf1ac37
server: decode graphql parameter
2023-04-10 19:10:42 +02:00
Valentin Tolmer
c9997d4c17
server: statically enforce access control
2023-03-01 11:28:04 +01:00
Valentin Tolmer
e458aca3e3
db: Change the DB storage type to NaiveDateTime
...
The entire internals of the server now work using only NaiveDateTime,
since we know they are all UTC. At the fringes (LDAP, GraphQL, JWT
tokens) we convert back into UTC to make sure we have a clear API.
This allows us to be compatible with Postgres (which doesn't support
DateTime<UTC>, only NaiveDateTime).
This change is backwards compatible since in SQlite with
Sea-query/Sea-ORM, the UTC datetimes are stored without a timezone, as
simple strings. It's the same format as NaiveDateTime.
Fixes #87 .
2023-01-13 15:50:03 +01:00
Valentin Tolmer
09a0522e2d
server: move domain types to a separate file
2022-11-25 15:35:48 +01:00
Valentin Tolmer
e89b1538af
server,app: migrate to sea-orm
2022-11-25 15:35:48 +01:00
Valentin Tolmer
4c69f917e7
server: Improve equality handling in filters
...
Now the columns are checked and mapped to user columns, to avoid any
ambiguity.
Fixes #341 .
2022-10-19 08:43:38 +02: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
cf19fd41b0
server: Update permission checks for strict_readonly
2022-07-08 19:02:20 +02:00
Valentin Tolmer
c72c1fdf2c
server: Add a Uuid attribute to every user and group
2022-07-01 12:41:12 +02:00
Valentin Tolmer
23a4763914
server: Add tracing logging
...
Fixes #17
2022-06-30 17:14:13 +02:00
Valentin Tolmer
da186fab38
ldap: add support for memberOf attribute
...
The "memberOf" filter was already supported, but not the attribute.
Fixes #179
2022-06-10 15:22:06 +02:00
Valentin Tolmer
ff698df280
server: Introduce a read-only user
2022-06-06 17:27:37 +02:00
Valentin Tolmer
ca19e61f50
domain: introduce UserId to make uid case insensitive
...
Note that if there was a non-lowercase user already in the DB, it cannot
be found again. To fix this, run in the DB:
sqlite> UPDATE users SET user_id = LOWER(user_id);
2022-03-26 18:23:19 +01:00
Valentin Tolmer
c850fa4273
server: refactor group requests to use filters
2022-02-12 14:27:02 +01:00
Valentin Tolmer
a1fe703bf0
server: rename RequestFilter to UserRequestFilter
2022-02-12 14:27:02 +01:00
Valentin Tolmer
790fd7c5d1
cargo: Update to 2021 edition
2021-11-23 00:25:47 +01:00
Valentin Tolmer
42da86cf72
graphql: Implement looking up a group's users
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
480f48f820
graphql: Add a method to list groups
2021-09-20 11:23:57 +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
d8df47b35d
Move backend source to server/ subpackage
...
To clarify the organization.
2021-08-31 20:32:55 +02:00