46 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
thuning @ vall cdc9d93d02 Whitespace 2026-04-01 11:43:37 +02:00
Erik Thuning 470901d5bb Formatting 2024-09-03 14:32:12 +02:00
Erik Thuning 2d1d079db5 Updated entmap examples and slightly rearranged readme 2024-09-03 14:23:23 +02:00
Erik Thuning 3e11763912 Formatting 2024-08-28 14:51:53 +02:00
Erik Thuning 50e43f1dca Whitespace 2024-08-28 14:32:10 +02:00
Erik Thuning da61843349 Updated readme and confg.ini.example to reflect support for unix groups and the exclusion modifier 2024-08-28 14:29:49 +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 266ecd6cd9 Updated the documentation for manage-entitlements.py so the change from --no-entmap-update to --entmap-update is documented.
Also cleaned up whitespace and line lengths to make the readme more readable raw.
2024-08-28 14:22:37 +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 929f0603f1 Whitespace, typo and dead code cleanup 2024-08-28 13:41:24 +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 28573f67e6 Flipped the default behaviour for manage-entitlements.py
Instead of needing to pass a flag if entmap.conf is to be left unchanged, pass a flag (--entmap-update) in order for entmap.conf to be updated by the command.
2023-12-04 07:32:06 +01:00
Erik Thuning 25a71749dd Whitespace fix 2023-12-04 07:31:56 +01:00
root e9c1f4989d Fixed successful actions not getting reported as such in manage_entitlements.py 2022-03-20 14:24:32 +01: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 bd8fd98aea Import hygiene 2021-10-05 15:37:07 +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
Erik Thuning c438105304 Tweak 2020-10-01 13:44:41 +02:00
Erik Thuning e37db80774 Documenting the new course query for the daisy handler 2020-10-01 13:44:07 +02:00
Erik Thuning 337993b7dc Update README.md 2020-09-27 16:16:06 +02:00
root 5b5097458e Streamlined fetching of course participant usernames from daisy api 2020-09-23 11:28:33 +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 3f1a490fd5 Fixed an error in the argparse usage 2019-06-05 13:24:45 +02:00
root 26e8eaf30e Formatting changes 2018-11-26 08:50:22 +01:00
root 247fe7d147 Updated the help text a bit 2018-11-22 16:02:18 +01:00
Erik Thuning 4b50bb8478 Create README.md 2018-11-22 15:58:39 +01:00
root dc3e36aace renamed: dependencies -> dependencies.list 2018-11-22 14:30:14 +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 3fea90bfea Updated the API call to reflect changes in API semantics 2018-11-22 14:26:08 +01:00
root 5400ae4a51 Added a configuration item for the entitlement map 2018-11-22 14:25:27 +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 09821d9573 Shortened the example 2018-11-20 10:44:07 +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 8c96c5dd34 Added some more patterns to exclude 2018-11-19 15:36:14 +01:00
root 1256f2f7a6 Fixed an issue with daisy being sneaky 2018-11-19 15:34:32 +01:00
root f16755ae6c Added the code 2018-11-19 12:09:43 +01:00
root 4ed4e8d063 Initial commit, added gitignore 2018-11-19 11:49:49 +01:00