1
Fork 0
Commit Graph

12 Commits

Author SHA1 Message Date
Juliusz Chroboczek 841d95d21c Fix handling of AutoSubgroups in readDescriptionFile.
We used to test AutoSubgroups before upgrading the description,
which would break handling of the (obsolete) AllowSubgroups
field.

Thanks to David Saulpic.
2024-04-17 18:50:35 +02:00
Juliusz Chroboczek 3409f5a27f Replace uses of os.IsExist and os.IsNotExist with errors.Is.
The former don't properly unwrap errors.
2024-04-14 13:34:32 +02:00
Juliusz Chroboczek bbd9ef1f5c Create directories for subgroups. 2024-04-14 00:50:11 +02:00
Juliusz Chroboczek a3f894a31e Fix JSON formatting of user descriptions. 2024-04-12 01:27:49 +02:00
Juliusz Chroboczek 695c379a6c Distinguish empty key in password from absence of key. 2024-04-12 01:05:48 +02:00
Juliusz Chroboczek 7673a95b05 Implement FallbackUsers in API. 2024-04-11 17:53:48 +02:00
Juliusz Chroboczek 31a18bcf44 Implement keys handling in API. 2024-04-11 14:30:44 +02:00
Juliusz Chroboczek fc6387bb38 Implement accessors for description files.
Allow reading and modifying description files, in a manner
that aligns with the needs of the API.
2024-04-10 14:09:52 +02:00
Juliusz Chroboczek 1666abf2f3 Add allowSubgroups argument to readDescription. 2024-04-09 22:49:03 +02:00
Juliusz Chroboczek d887a216f0 Rework configuration file format.
The "users" entry is now a dictionary mapping user names to
passwords and permissions.  In order to allow for wildcards,
there is a new type of password, the wildcard password, and
an extra array called "fallback-users".

The field "allow-anonymous" no longer exists, this is now
the default behaviour.  The field "allow-subgroups" has been
renamed to "auto-subgroups".

We provide backwards compatibility for group definition files,
but not for the config.json file, where the old "admin" array
is simply ignored.
2024-04-09 22:49:03 +02:00
Juliusz Chroboczek de0c42faaf Implement "expires" and "not-before" for groups. 2024-03-03 16:45:54 +01:00
Juliusz Chroboczek bfe83d1a27 Move description code into its own file. 2024-02-20 18:19:24 +01:00