160 Commits

Author SHA1 Message Date
3b64aeb97b Add OAuth 2.0 authorization login (#293)
* [WIP] Add OAuth 2.0 authorization login

* Add social user relationship table

* Update social user relationship table back_populates

* Add OAuth 2.0 related interface

* Automatically redirect authorization addresses

* Update OAuth2 authorization to GitHub

* Add implementation code

* fix the callback interface return

* fix typo

* fix the api return

* fix imports

* Fix logic for creating system users and social tables

* Fix user information storage

* Add OAuth2 source link

* remove unnecessary db refresh

* remove the front end docker-compose annotation
2024-03-15 13:46:43 +08:00
8af4336428 Update interface file directory level (#295)
* Update interface file directory level

* fix ruff format
2024-02-25 20:48:25 +08:00
115b6f0b30 Update the response status code in exception handlers (#292) 2024-02-20 10:40:21 +08:00
94cbc629cd Fix custom validator exception serialization in dev mode (#278)
* Fix custom validator exception serialization in dev mode

* Fix formatting judgment conditions
2024-01-24 10:17:20 +08:00
4f1d1c2094 Add custom email string type (#277) 2024-01-24 10:17:04 +08:00
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
576160129a Update interface coding style (#275) 2024-01-20 19:58:19 +08:00
754b9d9edc Fix dept and menu parent id update logic (#274) 2024-01-20 19:58:06 +08:00
a41b1673e5 Update schemas naming style (#272) 2024-01-18 19:27:41 +08:00
a22aaa0a3e Attempt to optimize serialization performance (#266)
* Attempt to serialize performance optimization

* Add casbin service functions return type

* update comments
2024-01-11 20:15:03 +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
f39d11eb9d Fix use request.form() in middleware (#260)
* Fix request.form() in middleware

* resume global exception handling

* update the order in which data is processed

* Add demo interface for uploading files

* fix path params
2024-01-03 22:23:56 +08:00
227221ff67 Clean up outdated pydantic dict methods (#262) 2024-01-02 22:05:20 +08:00
7bfc7908ab Migrate to pydantic-v2 (#246)
* update the schema to pydantic-v2

* upgrade the ruff version in pre-commit

* update pagination to p-v2

* update encoder to p-v2

* update response_schema to p-v2

* update exception_handler to p-v2

* update config to p-v2

* update crud base to p-v2

* Migrate the JSON Encoder to the official one to reduce maintenance costs

* updated readme description

* restore the bcrypt compatible version

* fix validation error log code return format

* Fix manual processing method for GetCurrentUserInfo

* Integrate pydantic validate exceptions and user exceptions

* Fix validation exception handler

* add custom open response code

* Add a stand-alone assertion error handler

* Restore todo deleted by v1 branch to v2

* Add email and phone number types
2023-12-20 23:56:37 +08:00
0b7f36ec4d Clean up todo and fix typo (#256) 2023-12-20 00:44:54 +08:00
af0ab78fc9 Add a stand-alone assertion error handler (#255) 2023-12-20 00:35:38 +08:00
00ad74b5c2 Prepare to lock the pydantic-v1 branch (#254) 2023-12-19 23:02:14 +08:00
1574d549e0 Fix exception handler parameter call (#253)
* Fix exception handler parameter call

* update the validation exception handler

* Update the content returned by the validation exception

* update import of JSONDecodeError

* fix validation exception handler typing

* Update the content returned by the validation exception handler
2023-12-19 21:17:49 +08:00
228ad0e82b Simplify the multivariate expression of exceptions handler (#252)
* Simplify the multivariate expression of cors middleware

* Simplify the multivariate expression of assert exception handler
2023-12-18 21:36:24 +08:00
58eb24c11a Fix get all G rules interface logic (#250) 2023-12-17 21:20:23 +08:00
7e17cbb4d8 Optimize operation log code type logic (#249) 2023-12-17 20:44:53 +08:00
50e6e6e647 Fix refresh token interface user type format (#248) 2023-12-17 20:21:11 +08:00
88e8e88c5e Fix validation error log code return type (#247) 2023-12-17 20:15:21 +08:00
470cd9a9c2 adopt ruff formatter (#242)
* adopt ruff formatter

* Fix merge format
2023-11-22 19:09:08 +08:00
447667ccf6 Fix database engine UUID type compatibility (#241) 2023-11-22 18:54:29 +08:00
ba738e5989 Fix unregistered error received when celery call task (#239) 2023-11-09 22:47:29 +08:00
9bb6c7ce27 Fix the conflict between Access and OperaLog middleware (#236)
* Fix the conflict between Access and OperaLog middleware

* Restore the app invocation logic

* Restore the Gzip middleware execution location
2023-11-01 15:03:51 +08:00
275f9e5e93 Replace APScheduler to Celery asynchronous tasks (#229)
* Replace APScheduler to Celery task

* black format

* Add celery to run the script

* Update celery usage to README

* Update test task

* Add celery rabbitmq broker

* Fix dockerfiles

* Add task interface access authorization

* Update celery deploy run

* Fix dockerfiles

* Fix supervisor conf

* Update celery broker default is redis

* Force the pro env to use rabbitmq

* Update the task interface

* Add celery beat README description

* Update warning text style

* Revoke the default config comment content of the supervisor
2023-10-27 11:59:46 +08:00
81c0d2cc74 Fix pytest interface unit tests (#233) 2023-10-23 19:30:30 +08:00
3bb28a3379 Add init pytest data sql file (#231)
* Add init pytest data sql file

* Fix SQL style
2023-10-22 20:54:27 +08:00
d0b16b67ef Remove the NoReturn return type (#232) 2023-10-22 20:46:53 +08:00
038df6a1f6 Fix the task run method and data type (#228) 2023-10-20 10:16:02 +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
4c33e36959 Fix global unknown exception return (#224) 2023-10-13 18:26:23 +08:00
5173ff734f Update the global unified response code (#223)
* Update the global unified response

* Update the uniform return model default

* Update the environment variable type
2023-09-27 13:45:38 +08:00
46d6fbccf5 Simplified query interface returns data serialization (#219)
* Simplified query interface returns data serialization

* reply to the inquiry pydantic verification

* restore import sorting
2023-09-27 10:46:30 +08:00
44844698ae Optimize role menu authorization logic (#221) 2023-09-26 18:13: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
5794cec94a Fix the task interface return data (#215) 2023-09-25 16:50:36 +08:00
0ce7225738 Fix int enum class inheritance (#208) 2023-09-02 17:17:23 +08:00
26d7492d6b Add ip location cache (#205)
* Add ip location cache

* Fix ip location cache

* Fix getting subscripts for offline locations
2023-08-28 18:28:22 +08:00
83b6a10327 Add jwt login whitelist (#204)
Co-authored-by: downdawn <downdawn22@gmail.com>
2023-08-28 15:33:18 +08:00
d0388b0256 Add ItsDangerous request parameters encryption (#203)
* Add ItsDangerous request parameters encryption

* fix typo

* update AES decryption returned as a string
2023-08-27 23:26:05 +08:00
d9ffe20121 Fix the interface logic for dept details (#201)
* Fix the interface logic for dept details
2023-08-12 21:17:50 +08:00
0b95f2c61e Update asynccasbin to casbin async api (#199)
* Update asynccasbin to casbin async api

* remove pymysql dependency

* update the test-user test to admin
2023-08-08 17:27:20 +08:00
7409285b49 Add api and casbin related interfaces (#198)
* Add get all apis and more interface

* Add casbin get related interface

* typo

* update function name
2023-08-07 20:46:32 +08:00
5aacc1607d Update the Casbin model matcher rules (#197) 2023-08-04 19:38:31 +08:00
09b42c3882 Update the nickname field creation logic (#196)
* Update the nickname field creation logic

* fix nickname field transfer
2023-08-04 19:33:40 +08:00
64f994c28f Add more Casbin related interfaces (#195)
* Add more Casbin related interfaces

* lint

* update delete all api paths

* fix decimal data format

* update add user interface return

* fix add user interface return

* fix interface path is wrong

* lint
2023-08-03 14:42:52 +08:00