25 Commits

Author SHA1 Message Date
cd96d2f5cd Update dao and service instantiation styles (#276)
* Update dao and service instantiation styles

* Fix auth_service use
2024-01-22 10:22:13 +08:00
5c7d6659cf Reconstruct RBAC authentication logic (#264)
* Reconstruct RBAC authentication logic

* fix typo

* Migrate casbin sqla Adapter to redis

* Delete casbin model conf file

* Add permission dependencies

* Add request permission depends on execution condition

* Update openapi authorization method

* Add request permission identity

* Add request permission dependency description

* Migrate casbin redis adapter to sqla

* Update menu model and add function

* Fix menu permission identification

* Update user partial interface permissions

* Update menu table SQL

* Add role menu permission description to README

* fix README typo

* Simplify permission dependency injection

* Fix menu authorization store

* Fix interface permission dependency order

* Update role menu permission flag

* Update the background permission logic of the interface
2024-01-08 09:35:47 +08:00
470cd9a9c2 adopt ruff formatter (#242)
* adopt ruff formatter

* Fix merge format
2023-11-22 19:09:08 +08:00
bc942cde49 Add token decoding expiration exception (#227)
* Add token decoding expiration exception

* Catch any decoding exceptions
2023-10-18 18:37:07 +08:00
079b994541 Update the pytz library to zoneinfo (#226)
* Update the pytz library to zoneinfo

* delete debug print
2023-10-16 18:45:08 +08:00
de9b10a867 Fix token whitelist and new token storage (#220)
* Fix token whitelist and new token storage

* Fix logout interface logic
2023-09-26 18:09:55 +08:00
eb662e4525 Add user password encryption salt (#191)
* Add user password encryption salt

* update the salt logic

* Update the SQL files

* Add an update admin login permission interface

* update the is_staff field comment

* update the staff error msg

* Update user backend management operation permissions
2023-07-31 10:53:46 +08:00
caa90a746d Update some interface permission checks (#158) 2023-06-26 19:58:32 +08:00
3d0d0ccde3 Refactor global datetime to timezone datetime (#152) 2023-06-20 16:50:42 +08:00
439ab09ebd Update the status field type to int (#143) 2023-06-17 17:22:32 +08:00
d498969400 The level field is deprecated but remained (#134) 2023-06-15 17:25:54 +08:00
29d5a17190 Update JWT status detection (#133) 2023-06-15 12:01:06 +08:00
c53fa9fda8 Update and fix permissions logic (#129)
* Update and fix permissions logic

* feat: Update base route

* Exclude non-system routing record operation logs

* Update the parameter variable name

* Fix the jwt authorization verify

* Roles menu authorization is turned off by default

* Fix the operation log code field type

* Update the casbin routing string to config

* Fix JWT middleware

* Add custom msg of token error

* Add the character length of the operation log code field

* Update the logout interface authorization
2023-06-14 22:34:56 +08:00
c716d456e8 Add departmental status authentication (#104)
* Add departmental status authentication

* Update jwt middleware error message output
2023-06-10 17:27:51 +08:00
e091b23589 Remove useless jwt role_ids (#103)
* Remove useless jwt role_ids

* Remove get_role_ids method
2023-06-09 16:44:55 +08:00
abcc9d2308 Add sync to async decorator support (#96)
* Add sync to async decorator support

* Update ASyncTranslator to asgiref
2023-06-06 20:13:33 +08:00
465884e82e Fix user authorization lock (#94) 2023-06-05 21:24:08 +08:00
14e1e20185 add jwt authentication middleware (#84)
* Add jwt authentication middleware

* Fix branch conflicts
2023-05-31 16:03:44 +08:00
227d76cc5f update token handling logic (#83)
* Update token store, refresh, whitelist

* Update the token handling logic when update a user's multi-login status

* Delete all tokens when the user delete

* Fix the user logout interface

* Fix the get refresh token interface

* Fix multi-point login judgement when creat token

* Update the refresh_token interface

* Fix redis prefix deletion exclusion

* Fix token deletion error when user deleted

* Update the token time base to datetime.now()

* Update limiter storage prefix to settings

* Fix user login time not updated to database

* Allowing a user to have multiple refresh tokens.

* Add code comment to user multi-login update method

* Remove refresh token get and create interface

* Add user update multipoint login delete refresh token
2023-05-31 15:24:09 +08:00
9b5a19a58b simplify crud method naming (#75)
* simplify crud method naming

* update get_user_list to get_select
2023-05-26 16:13:32 +08:00
7e16414c5b update token refresh expire time rule (#67)
* update token refresh expire time rule

* update token refresh time checks
2023-05-21 23:16:02 +08:00
e43f128086 add token refreshing mechanism (#62)
* add token refreshing mechanism

* update token_expires to token_expire_time

* Fix implicit type conversion exception catch
2023-05-19 21:28:48 +08:00
6fbddbafed fix jwt parameter parsing error 2023-05-19 19:17:03 +08:00
4c12c53e94 add token storage and logout (#57)
* add token storage and logout

* fix jwt expire time bug
2023-05-19 16:42:43 +08:00
e1edcade21 Add RBAC authorisation and some tools or optimisations (#41)
* WIP: add rbac authorization

* Perform pre-commit fixes

* add rbac route whitelist

* add init test data user role associations

* Restore database table id naming to fix generic crud base

* Add database section value uniqueness settings

* Update the test directory to tests

* Update route_name file name to health_check

* Split user auth and user action interfaces

* Fix conflict between merge and current branch

* Add pymysql dependencies

* Fix RBAC authentication method

* Add the select serialisation tool

* Fix missing return messages due to global exception handler slicing

* Update the user interface with associated relationships

* Add items to be completed

* Perform pre-commit fixes

* Add pre-made routers

* Paging data return structure optimisation

* Split user auth and user interface tests

* Fix user register test data structure error

* Fix duplicate named test classes
2023-05-17 22:13:37 +08:00