Commit Graph

354 Commits

Author SHA1 Message Date
Ferdinand Thiessen 30305c26cc [Plugin] Schedule: Identify EventTypes by ID not name 2021-01-24 16:20:25 +01:00
Tim Gröger 9bbae33e4c change response of events 2021-01-23 16:08:14 +01:00
Tim Gröger a0d1567b3c Merge branch 'pluginify' of groeger-clan.duckdns.org:newgeruecht into pluginify 2021-01-23 09:32:20 +01:00
Tim Gröger 4a13d3ceb1 fixed issue that on register_user the birthday can be set 2021-01-23 09:31:31 +01:00
Ferdinand Thiessen 94aac573e6 [System] Allow setting a test configuration for unit tests. 2021-01-23 02:17:14 +01:00
Tim Gröger fe7166686d fixed issue for user_avatar if userid is not set 2021-01-22 17:03:11 +01:00
Ferdinand Thiessen 125ba1be78 [Plugin] users: Fixed installation of permissions and added documentation. 2021-01-22 14:11:16 +01:00
Ferdinand Thiessen c4b80f27ee [Plugin] balance: Fixed shortcut data type check 2021-01-22 00:17:51 +01:00
Ferdinand Thiessen 826893e42e [Plugin] balance: Allow saving shortcuts 2021-01-21 20:24:10 +01:00
Ferdinand Thiessen bdbb2d3e45 [Plugin] balance: Do not provide default values for frontend, split this to the frontend project 2021-01-21 14:08:45 +01:00
Ferdinand Thiessen 69ec4472c3 [System][Plugin] users: Send users a link to set their own password and initially set random password 2021-01-21 14:08:06 +01:00
Ferdinand Thiessen f42d5956db [Plugin] balance: Added shortcuts configuration for balance 2021-01-20 15:21:33 +01:00
Ferdinand Thiessen aeadc78acc [System][Plugin] auth: Using find_user for password reset, fixes #443
* find_user will also search auth backend for user, so password recovery will also work if user was never logged in on Flaschengeist.
2021-01-19 03:30:49 +01:00
Ferdinand Thiessen 68512a9851 [Plugin] auth_ldap: Implemented find_user
* Search for user inside of auth backend
2021-01-19 03:29:26 +01:00
Ferdinand Thiessen d0db878a5c [Plugin] auth_ldap, balance: Some minor reformatting 2021-01-18 18:31:13 +01:00
Ferdinand Thiessen 7ec37914a1 [System] Send welcome and password-changed notifications, allow custom text per config file 2021-01-18 18:05:10 +01:00
Ferdinand Thiessen 049b64ffd5 [Plugin] auth: Implemented REST endpoint for password reset 2021-01-18 16:18:16 +01:00
Ferdinand Thiessen 1f93bc6d80 [System] Implemented password reset function in user controller 2021-01-18 16:17:40 +01:00
Ferdinand Thiessen 559c8c5c9c Implemented function to delete all active sessions of an user 2021-01-18 16:12:11 +01:00
Ferdinand Thiessen 23268f6557 Fixed hook for mail sending 2021-01-18 16:11:44 +01:00
Ferdinand Thiessen a9970bec5b Allow mail as login name. Implemented #428 2021-01-14 19:09:01 +01:00
Ferdinand Thiessen 991ffb2766 [Plugin]balance: Fixed typo in function name and fixed db model 2020-11-25 20:35:11 +01:00
Tim Gröger 4534d0ff15 Revert "[Avatar] Fix, sodass korrekte url rausgegeben wird."
This reverts commit 1b1dd8d7a7.
2020-11-20 20:21:47 +01:00
Tim Gröger 1b1dd8d7a7 [Avatar] Fix, sodass korrekte url rausgegeben wird. 2020-11-20 20:16:08 +01:00
Ferdinand Thiessen 4b2cb56fbe [System] Fix issue with avatar in userController 2020-11-18 03:18:52 +01:00
Ferdinand Thiessen 57930837ac [Plugin] balance: Added reverting feature 2020-11-18 02:55:31 +01:00
Ferdinand Thiessen 737dd9d5cf [Plugin]auth: Fixed possible issue with POST paramenters on login 2020-11-18 02:48:44 +01:00
Ferdinand Thiessen 4a4930d683 [Plugin] Schedule: Mostly final backend implemented. Tested. 2020-11-18 02:47:40 +01:00
Ferdinand Thiessen 6612a84cd3 [System] avatar URL needs to be generated as path might change 2020-11-18 01:56:33 +01:00
Ferdinand Thiessen 2d6b86e2eb [System][Plugin] Improved Hooks, roles and auth_ldap improvements
* Hooks now allow multiple hooked functions
* Hooks can now be called before and after a function call
* Fixed issue in datetime util when string is None or empty
* Roles: Return new created role as json
* auth_ldap: Use new Hooks
* auth_ldap: Fixed an issue where ldap response is not checked (when role gets renamed)
2020-11-18 00:39:25 +01:00
Ferdinand Thiessen 58e121473b Fixed avatar URL 2020-11-17 17:46:07 +01:00
Ferdinand Thiessen 88ff46c193 [Plugin] auth_plain: Implemented Avatar 2020-11-17 03:32:47 +01:00
Ferdinand Thiessen 28865649b4 [Plugin] Use plugin function instead of HookCall 2020-11-17 03:28:04 +01:00
Ferdinand Thiessen 39a259a693 [Plugin] roles: New permission needed for deleting roles 2020-11-16 14:21:19 +01:00
Ferdinand Thiessen 09c7f4a258 [Plugin] auth_ldap: Use Pillow to convert avatar if installed 2020-11-16 13:35:23 +01:00
Ferdinand Thiessen a270857c41 [Plugin]users, auth_ldap: Implemented avatar 2020-11-16 02:30:24 +01:00
Ferdinand Thiessen 9409533f7c [Plugin] Users: Allow roles in data if not changed. 2020-11-15 19:44:49 +01:00
Ferdinand Thiessen 602e1bc941 [System] Detect offline database 2020-11-15 18:53:46 +01:00
Ferdinand Thiessen 1d36aa4033 [Script][System] Added date as export format and added birthday as user attribute 2020-11-15 15:52:20 +01:00
Tim Gröger 04753e9a41 [Role] Fix Rolerename
Wenn gleicher name mitgesendet wird, wird die umbenennung nicht durchgeführt.
2020-11-15 14:19:59 +01:00
Tim Gröger c7642758ed [LDAP] editieren von bestehenden rollen. 2020-11-15 01:21:32 +01:00
Tim Gröger 2365f07588 [auth_ldap] lösche nicht benutzte gruppen im ldap
benötigt eine neue konfiguration des ldaps. Maingruppen dürfen nicht in der gleichen organisationunit wie alle anderen rollen sein.
2020-11-14 13:18:17 +01:00
Ferdinand Thiessen f9a873d303 [System] Fixed typo 2020-11-13 08:24:25 +01:00
Ferdinand Thiessen 2e77855fe9 [System] Fixed HTTP status when user has insufficient permission 2020-11-13 03:57:23 +01:00
Ferdinand Thiessen cbcd5b39a3 [Plugin] Added plugin function when roles are modified
LDAP: Use same config style as the rest.
2020-11-13 01:20:25 +01:00
Tim Gröger 96765ee932 [LDAP] Neue Rollen werden hinzugefügt 2020-11-12 23:42:03 +01:00
Tim Gröger 65af9ab367 [LDAP] Rollen updaten
* LDAP-Rollen werden geupdatet, wenn User geändert wird
* LDAP-Rollen werden geupdatet, wenn eine neue Person hinzugefügt wird.
2020-11-12 22:47:10 +01:00
Ferdinand Thiessen 90f5267a36 [Controller] Fixed bug in registration, thanks @crimsen 2020-11-12 21:53:38 +01:00
Tim Gröger 0f64c718f5 [System] Usermodel geändert
* firstname und lastname nun 50 Zeichen lang
* email 60 zeichen lang
2020-11-12 19:30:18 +01:00
Tim Gröger 130774e665 [LDAP] User können erstellt werden.
* erstelle neuen user im ldap (ohne rollen)
2020-11-12 19:29:24 +01:00
Ferdinand Thiessen c524f2a7db [System] Fixed user controller to allow new roles 2020-11-12 16:58:40 +01:00
Ferdinand Thiessen 53c39f4f92 [System] Added util for 201&204 HTTP response and some code formatting 2020-11-12 00:12:52 +01:00
Ferdinand Thiessen 7074c29d63 [Script] Fixed export function to work with Optional (requires python 3.8+) 2020-11-11 23:56:07 +01:00
Ferdinand Thiessen 824ffc8675 [Plugin] Roles: Fixed controller and Model
* Identify role by id not name, as name might change
* Set permissions and Delete Role are fixed (db exception was thrown)
2020-11-09 03:44:35 +01:00
Ferdinand Thiessen 6f0e9854d6 [API][Plugin] Bugfix and API change
* users: Fixed bug in edit_user where if modify by admin
* API: Users return list of roles as string not Roles
2020-11-06 01:13:52 +01:00
Ferdinand Thiessen 7aba295e45 Fixed members of Session for frontend usage 2020-11-05 03:57:55 +01:00
Ferdinand Thiessen 03aefbb35a [Plugin] balance: Allow debiting from own account if DEBIT_OWN is set 2020-11-02 17:12:59 +01:00
Ferdinand Thiessen d8100b129e [Plugin] schedule: Allow creating JobSlots from POST 2020-11-02 16:30:10 +01:00
Ferdinand Thiessen 5a8a4aa23d [Plugin] schedule: Basics work (all models) 2020-11-02 15:45:38 +01:00
Ferdinand Thiessen ac1189ecaa [Plugin] schedule: Use utils to parse datetime 2020-11-02 15:45:38 +01:00
Ferdinand Thiessen 4da4c1ee01 [Plugin] schedule: Working Event, EventSlot, EventType and JobType 2020-11-02 15:45:38 +01:00
Ferdinand Thiessen 363ec6530b [Plugin] schedule: Added EventType and JobType support 2020-11-02 15:45:38 +01:00
Ferdinand Thiessen 7dec0144d9 [Plugin] schedule: Fixed models and controller 2020-11-02 15:45:38 +01:00
Ferdinand Thiessen b4234c43b8 [Plugin] schedule: Fixed models 2020-11-02 15:45:38 +01:00
Ferdinand Thiessen 63660743bd [Plugin] schedule: Restructure plugin 2020-11-02 15:45:38 +01:00
Ferdinand Thiessen 67fb895cf4 [Plugin] auth: Handle exception if data is not json 2020-11-02 15:45:24 +01:00
Ferdinand Thiessen 79c05fa2f4 [System] Fixed typo in utils 2020-11-02 13:38:52 +01:00
Ferdinand Thiessen 22499b7ece [System][Plugin] Allow military timezone names for datetime 2020-11-02 13:32:44 +01:00
Ferdinand Thiessen 56a0a8e06a [System][Script] Improved run_flaschengeist to also export plugin models 2020-11-02 04:38:38 +01:00
Ferdinand Thiessen d1fcbcf68f [Plugin] balance: Fixed controller 2020-11-02 03:29:29 +01:00
Ferdinand Thiessen d07aa977b5 [Doc] Some more documentation on Plugin 2020-11-01 18:43:44 +01:00
Ferdinand Thiessen d439cd93c8 [Plugin] balance: Enhanced the model by adding serialization members 2020-11-01 18:38:53 +01:00
Ferdinand Thiessen 36c4027c5d [System] Some cleanup 2020-11-01 18:37:08 +01:00
Ferdinand Thiessen 2f9446be2f [Doc] Some more documentation 2020-11-01 16:25:54 +01:00
Ferdinand Thiessen 425eb1c849 [Plugin] balance: Added config option to add a default limit 2020-11-01 16:16:51 +01:00
Tim Gröger 66d559f63b Fixed Bug to check Permissions 2020-10-31 21:30:48 +01:00
Ferdinand Thiessen 7b2334bd98 [Plugin] Remove redundant code, balance and roles 2020-10-31 18:03:04 +01:00
Ferdinand Thiessen 39f34ff434 [Plugin] Fixed return values for balance and roles routes 2020-10-31 15:23:49 +01:00
Ferdinand Thiessen e5b39a6ef6 [Plugin] Fixed return values in auth and users routes 2020-10-31 15:20:28 +01:00
Ferdinand Thiessen de5a2e1c65 Added registration feature 2020-10-31 00:02:02 +01:00
Ferdinand Thiessen 5da5fcde8f [System] Some improvements on models and decorator
* User: userid is now not nullable
* Session: __eq__ fixed
* decorator: split decorator and session extration
2020-10-31 00:00:23 +01:00
Ferdinand Thiessen 9455920141 [System] config now deep update when multiple config files are used 2020-10-30 23:59:07 +01:00
Ferdinand Thiessen f60c06bc17 Some Cleanup of setup.py and documentation in auth 2020-10-30 22:19:16 +01:00
Ferdinand Thiessen 9bbcaa5bc9 [DB] Breaking change: User Attribute is now a pickle type 2020-10-30 22:18:46 +01:00
Ferdinand Thiessen ff6c973eef [System] Fixed issue when Authorization header is missing 2020-10-30 22:17:43 +01:00
Ferdinand Thiessen 32783041d8 [Plugin] Added balance plugin
Extends the users plugin.

* Users can have an account with a balance
* Users can send from them to others
* Admins can set the balance
* Admins can set limits
2020-10-30 22:15:37 +01:00
Ferdinand Thiessen e0d3b211bb [Doc] User plugin documentation created 2020-10-30 05:53:15 +01:00
Ferdinand Thiessen 8a9776ae0e [Doc] More documentation on decorator and plugins roles and auth* 2020-10-30 04:05:59 +01:00
Ferdinand Thiessen a5d3b837cd Restructured project, renamed modules, removed geruecht as it is dead. 2020-10-30 03:30:46 +01:00
Ferdinand Thiessen 58302595f3 [Doc] Added full documentation to Auth 2020-10-30 03:06:18 +01:00
Ferdinand Thiessen 4a7caad7e8 [Doc] pdoc route documentation test 2020-10-30 02:46:29 +01:00
Ferdinand Thiessen 56fff76bc2 [Doc] pdoc route documentation test 2020-10-30 02:28:15 +01:00
Ferdinand Thiessen 6dfdffebf9 [Doc] Some more documentation 2020-10-30 02:12:06 +01:00
Ferdinand Thiessen 50b6ac85ce [Plugin] auth_* Fixed some minor issues 2020-10-29 02:07:40 +01:00
Ferdinand Thiessen 97b6d9d979 [Plugin] LDAP: Fixed password change 2020-10-28 20:30:21 +01:00
Ferdinand Thiessen bda76e200a [System] Consistent variable names 2020-10-28 14:42:48 +01:00
Ferdinand Thiessen 993abf4148 Merge branch 'pluginify' of groeger-clan.duckdns.org:newgeruecht into pluginify 2020-10-28 14:23:07 +01:00
Ferdinand Thiessen 254a64efec [System][Doc] Made bjoern optional 2020-10-28 14:21:54 +01:00
Ferdinand Thiessen 216b757740 [System] Reworked logging and configuration, breaks configs. 2020-10-28 14:21:20 +01:00
Tim Gröger a0b8dbe36a Fixed hidden attributes in auth and users 2020-10-28 12:58:34 +01:00
Ferdinand Thiessen a3106ccf1f [Doc] Readme windows 2020-10-27 13:43:01 +01:00
Ferdinand Thiessen 8ac43826dc [Model] Event has userid not user 2020-10-27 13:38:03 +01:00
Ferdinand Thiessen c3b5721202 [System] Fixed usage of protected members 2020-10-27 13:37:13 +01:00
Ferdinand Thiessen e14553651f [Plugin] Fixed auth_ldap usage of User 2020-10-27 13:36:23 +01:00
Ferdinand Thiessen d2858c8c76 [Plugin] Users now allows setting the role of an user 2020-10-24 20:10:43 +02:00
Ferdinand Thiessen dc6b30e4e7 Improved modify_user for backend plugins 2020-10-24 20:09:45 +02:00
Ferdinand Thiessen d3a2b40834 Added some permissions, reworked permission system. 2020-10-23 02:29:55 +02:00
Ferdinand Thiessen ba0c76a727 Improved Typescript Interface generation, enabled it for events 2020-10-23 02:03:06 +02:00
Ferdinand Thiessen b8db07b741 Fixed plugin permissions installation 2020-10-20 19:34:14 +02:00
Ferdinand Thiessen 92626dc0c6 Some work on event models 2020-10-20 19:25:10 +02:00
Ferdinand Thiessen 854a1f6156 Improved some permission related stuff, rewrote session controller 2020-10-20 18:52:02 +02:00
Ferdinand Thiessen db96d4b178 Made database datetime timezone aware 2020-10-20 17:53:29 +02:00
Ferdinand Thiessen addfb7c7c4 Some more on autodetection API interfaces for frontend
* Breaks API for Session and User
2020-10-19 16:48:34 +02:00
Ferdinand Thiessen 28b202cf30 Detect version of plugins from setup.py, updated Readme 2020-10-19 13:16:23 +02:00
Ferdinand Thiessen c629f5abf3 Rename AccessToken model to Session, same with controller. 2020-10-19 01:41:54 +02:00
Ferdinand Thiessen ec05cde746 Fixed Hooks, use own implementation. Fixed routes. 2020-10-16 00:37:57 +02:00
Ferdinand Thiessen 287cc91947 Added comment about git blame 2020-10-15 22:16:26 +02:00
Ferdinand Thiessen 41e60425a9 Format code with black (line length: 120)
https://github.com/psf/black
2020-10-15 22:10:50 +02:00
Ferdinand Thiessen 2c55edf6a8 Only use one plugin system, load auth and "normal" plugins at once.
* Added Plugin class, where to inheritate from
2020-10-15 21:58:56 +02:00
Ferdinand Thiessen f03314efac Split installation and app creation. Added Readme 2020-10-15 14:44:58 +02:00
Ferdinand Thiessen 21ea9b3cdf Added readme 2020-10-15 12:40:53 +02:00
Ferdinand Thiessen e4f42006a7 Fixed uncaught exception in auth and wrong example config 2020-10-15 12:05:16 +02:00
Ferdinand Thiessen 3f9fdc773c Fixed typos and timezone 2020-10-15 02:19:51 +02:00
Ferdinand Thiessen f495829fc7 Add permissions when plugins are loaded 2020-10-04 01:27:05 +02:00
Ferdinand Thiessen 4cd68d7e81 Added Role controller 2020-10-04 01:25:50 +02:00
Ferdinand Thiessen bf33529bf1 Cleanup. Move old controller, removed unused code. 2020-09-07 18:11:38 +02:00
Ferdinand Thiessen 7caaea71a7 Some new routes for schedule plugin 2020-09-07 16:13:18 +02:00
Ferdinand Thiessen 0abde3e899 Merged upstream app creation into development 2020-09-07 16:09:29 +02:00
Ferdinand Thiessen ad3e2a34b8 Added route for getting API version and installed plugins + some cleanup 2020-09-07 16:07:35 +02:00
Ferdinand Thiessen 4a92b057e8 More meaningful authentication JSON 2020-09-06 22:33:27 +02:00
Ferdinand Thiessen 0edd55b64e Encode datetime in JSON as ISO string 2020-09-05 22:26:36 +02:00
Ferdinand Thiessen bd657d11b6 First version of schedule plugin 2020-09-05 22:26:00 +02:00
Ferdinand Thiessen 7f6ff3f001 Added first version of 'users' module, fixed LDAP 2020-09-04 01:51:16 +02:00
Ferdinand Thiessen 365677697d Some more cleanup, added modify_user to LDAP 2020-09-04 00:59:10 +02:00
Ferdinand Thiessen 7fbff30214 [API BREAK] Changed authentication routes
Authentication is now on /auth/... and using REST pathes and methods.
AccessToken are now having a expires field instead of timestamp, more
usefull for automatic removal of expired ones.
2020-09-03 22:29:14 +02:00
Ferdinand Thiessen b6157f4953 Added ErrorHandler for automatic Exception handling
No need for try except for HTTP 500 or 403 error
2020-09-03 22:04:28 +02:00
Ferdinand Thiessen ea107a28dd cleanup 2020-09-03 17:56:12 +02:00
Ferdinand Thiessen 5bfa305c41 Fixed auth. Some cleanup 2020-09-02 13:07:21 +02:00
Ferdinand Thiessen b4505de253 Fixed typos 2020-09-02 01:32:55 +02:00
Ferdinand Thiessen e4b4db3405 Init of schedule plugin 2020-09-02 01:10:54 +02:00
Ferdinand Thiessen 3256787d64 Fixed AccessTokenController. Fixed typos and styling. 2020-09-02 01:09:24 +02:00
Ferdinand Thiessen 66dcfa80b1 Fixed Typo in accessController, added Roles for access controll 2020-09-01 21:36:25 +02:00
Ferdinand Thiessen 48dd7ea6ec Merge branch 'develop' into pluginify 2020-08-25 22:38:57 +02:00
Ferdinand Thiessen cfcd77a985 Merge branch 'develop' into pluginify 2020-08-25 04:39:36 +02:00
Ferdinand Thiessen 53d502336e Added LDAP authentification plugin 2020-08-25 04:36:05 +02:00
Ferdinand Thiessen 7d8fa4f630 Fixed main- and accessToken Controller to work with pluginify 2020-08-25 04:34:57 +02:00
Ferdinand Thiessen bbee163954 Fixed plugin detection 2020-08-25 04:34:14 +02:00
Ferdinand Thiessen 5f408bfd3c Support lifetime methods on accesstokens 2020-08-25 04:31:34 +02:00
Ferdinand Thiessen 32066b1005 Make it possible to configure plugins.
* Reworked configuration
2020-08-23 23:58:26 +02:00
Ferdinand Thiessen a000ccfb1c Added modules for authentification.
* Added base class for auth plugins
  * Provide plain_auth (using password authentification)
  * Provide module for login and logout handling
2020-08-22 16:47:56 +02:00
Ferdinand Thiessen 187dc40730 Use flask logger, fixing app creation, split geruecht and user 2020-08-22 14:02:39 +02:00
Ferdinand Thiessen ec0bd12caa Remove vim files from repository 2020-08-21 13:55:42 +02:00
Ferdinand Thiessen 1bac2e857f Fixed plugin detection. Added dummy user plugin. Nothing works atm 2020-08-20 17:19:16 +02:00
Ferdinand Thiessen 246bd90ebd Restructure code for pluginify 2020-08-20 16:32:38 +02:00