20 Commits

Author SHA1 Message Date
Erik Thuning
072b6e87ae Switched to virtual environment instead of global packages
There was an issue with the apt packages where
python3-requests-kerberos didn't actually work. Instead of debugging
the apt package I switched to using a venv, which should be more
robust anyway.
2026-04-01 13:23:35 +02:00
thuning @ vall
2a10683bd6 Rearranged imports to conform better to PEP 8 2026-04-01 12:37:33 +02:00
Erik Thuning
e63264943e Added support for negative queries when specifying entitlements.
This to support excluding certain users belonging o a group:
 dsv-user:foo = unixgroup:dmc
 dsv-user:foo = !user:Administrator
2024-08-28 14:27:27 +02:00
Erik Thuning
24e70ef8fc Added support for unix groups as a handler type 2024-08-28 13:48:59 +02:00
Erik Thuning
1f487fc33d Added logging of usernames at the debug level.
Also minor rearranging of logic so debug lines get printed in dry runs, and made some variable names more descriptive
2024-08-28 13:46:11 +02:00
Erik Thuning
68380cda9e Made sure all handlers always return a set, and consequently stopped casting to set on the receiving end 2024-08-28 13:44:22 +02:00
Erik Thuning
51765e9181 Changed the exit code on failed actions to a more unique value 2024-04-23 11:30:42 +02:00
Erik Thuning
861beb3493 Logging to stdout instead of stderr 2021-10-06 12:48:14 +02:00
root
463c8ac02c Improved logging
update-entitlements.py will now report the actual errors encountered in addition to reporting that an error occurred.

 * Logging is now done by a logger
 * EntitlementHandler.py raises an exception on failed actions
 * update-entitlements.py passes the exception along to the list of failed actions
2021-10-05 15:37:38 +02:00
root
54a60ae5b9 Maybe fixed a bug? 2020-11-04 15:50:15 +01:00
root
61d91ddb9f Moving towards more pluggable handlers 2020-10-09 17:11:20 +02:00
root
33a0869672 Added the ability to grant entitlements to course participants via daisy:course:{daisy_id}
Also added an optional argument to update-entitlements.py to only act on apecified entitlements
2020-09-11 15:29:57 +02:00
root
e73ccd1877 Fixed a typo 2019-06-06 15:37:29 +02:00
root
4b2acccd7f Decreased the amount of output produced by default.
Added a helper for conditionally printing output messages based on a verbosity level.
2019-06-05 13:25:57 +02:00
root
247fe7d147 Updated the help text a bit 2018-11-22 16:02:18 +01:00
root
b481d79df5 Added a handler class for the entitlement map, along with some minor commandline updates to manage-entitlements.py 2018-11-22 14:28:08 +01:00
root
2b7f4a0899 Made the entmap parsing regex more robust, fixed a bug with relative filename for the keytab when not calling the script from the same directory 2018-11-20 15:52:20 +01:00
root
87c49d541e Output tweaks 2018-11-20 10:28:40 +01:00
root
1bd4eeefb3 Added argument handling, a 'none' mapping type and modified the output a bit 2018-11-19 15:37:25 +01:00
root
f16755ae6c Added the code 2018-11-19 12:09:43 +01:00