1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-24 17:45:58 +01:00
Commit graph

25 commits

Author SHA1 Message Date
Juliusz Chroboczek
7fe6a5da91 Fix typo in Permissions.String. 2024-10-30 17:33:58 +01:00
Juliusz Chroboczek
cd224ffed2 Add String method to group.Permissions. 2024-10-30 14:10:28 +01:00
Juliusz Chroboczek
86fac519a5 Fix handling of subgroups in GetDescriptionNames. 2024-10-25 16:10:39 +02:00
Juliusz Chroboczek
ddcb9ed0cc Simplify syntax of permissionsMap. 2024-06-02 01:45:51 +02:00
Juliusz Chroboczek
cf2dc406d5 Remove dead function SetWildcardUser. 2024-06-01 17:04:06 +02:00
Juliusz Chroboczek
d9e956be48 More JWT paranoia. 2024-05-11 22:45:52 +02:00
Juliusz Chroboczek
969354e9e5 Honour the kid field in JWT if present. 2024-05-11 12:29:30 +02:00
Juliusz Chroboczek
6c01925342 Ensure that keys can be parsed in SetKeys. 2024-05-09 18:54:03 +02:00
Juliusz Chroboczek
1315084185 Implement message permission and shutup command. 2024-05-08 16:24:32 +02:00
Juliusz Chroboczek
d29d14da16 Add low-level support for managing wildcard user. 2024-05-08 14:28:28 +02:00
Juliusz Chroboczek
f0ebf4d63c Copy user structure in UpdateUser. 2024-05-08 14:24:37 +02:00
Juliusz Chroboczek
9eb0364016 Allow a single wildcard user.
Rename the fallback-users entry to wildcard-user, and only
allow a single fallback user.  This is missing the HTTP API.
2024-05-03 20:24:32 +02:00
Juliusz Chroboczek
c2260c50db Upgrade description after setting filename.
Otherwise warning messages during upgrading cannot print the
filename.
2024-05-02 00:01:01 +02:00
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