Commit Graph
95 Commits
Author SHA1 Message Date
Wu Clan 3d0d0ccde3 Refactor global datetime to timezone datetime (#152) 2023-06-20 16:50:42 +08:00
dylan da6f6b8c24 Fix permitted exception. (#151)
* Fix permitted exception.

* Fix opera get code and msg exception.
2023-06-19 19:31:54 +08:00
Wu Clan 465b68d35e Add datetime util (#149)
* Add the datetime utils

* lint
2023-06-19 09:24:23 +08:00
Wu Clan 59f1daba90 Add the schema base class (#148) 2023-06-18 19:47:39 +08:00
Wu Clan 616243c0dc Fix the exception handler HTTPException type error (#146) 2023-06-17 19:55:04 +08:00
Wu Clan 8251c66fc3 Fix the operation log field type error (#145)
* Fix the operation log title error

* Fix the operation log UploadFile type error
2023-06-17 18:56:46 +08:00
Wu Clan 439ab09ebd Update the status field type to int (#143) 2023-06-17 17:22:32 +08:00
Wu Clan 29b170f599 Update the server monitoring interface (#141) 2023-06-17 16:19:57 +08:00
Wu Clan 3aa68cdb6c Fix the operation log message error (#140) 2023-06-17 16:17:30 +08:00
Wu Clan 47b4409b42 Add system monitoring interface (#135) 2023-06-15 20:13:56 +08:00
Wu Clan d498969400 The level field is deprecated but remained (#134) 2023-06-15 17:25:54 +08:00
Wu Clan 29d5a17190 Update JWT status detection (#133) 2023-06-15 12:01:06 +08:00
Wu Clan 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
dylan b18dea55aa add dictionary management interface (#127)
* add dictionary management interface

* fix dictionary data one-to-many annotation
2023-06-14 15:39:41 +08:00
Wu Clan c9d620691c fix the operation log storage exception (#130) 2023-06-14 15:00:43 +08:00
Wu Clan f8b48e4eea Add login graphic captcha (#124)
* add the get verification code interface

* add the login interface captcha

* clean up the debugging code
2023-06-13 23:27:12 +08:00
dylan 0bb6275eba Omitting table names from the autogenerate process (#125) 2023-06-13 23:20:44 +08:00
Wu Clan 5c64d99451 Add menu-related interfaces (#118)
* Adding menu-related interfaces

* fix schema typo

* add menu query interface validation
2023-06-13 16:37:39 +08:00
Wu Clan ceb8bdc607 Fix log table msg field length (#117)
* Fix log table msg field length

* add logo url path to opera log exclude
2023-06-12 21:57:13 +08:00
Wu Clan df4de20ba4 Update development process suggestions (#114) 2023-06-12 18:50:17 +08:00
Wu Clan 37ecff4fc3 Update the README document (#113)
* Update the README document

* fix typo
2023-06-11 12:50:06 +08:00
Wu Clan d292768432 Fix offline parse ip info (#112)
* Fix get info subscript

* Fix return typing
2023-06-11 12:49:46 +08:00
dylan c4c835cfb8 opera_log_middleware method split (#105)
* opera_log_middleware method split

* extract ip and ua information

* added ua and ip information to login log and operation log

* extract request args func

* desensitization adds async decorations

* fix get summary exception

* fix get summary exception2
2023-06-11 05:05:31 +08:00
Wu Clan a80f060dde Replace aioredis to redis. (#108)
* Replace aioredis to redis.

* TimeoutError from redis exceptions.
2023-06-10 17:28:31 +08:00
Wu Clan 682e2fdd88 Add casbine-related interfaces (#107)
* Add casbin-related interfaces

* format
2023-06-10 17:28:18 +08:00
Wu Clan c716d456e8 Add departmental status authentication (#104)
* Add departmental status authentication

* Update jwt middleware error message output
2023-06-10 17:27:51 +08:00
dylan 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
Wu Clan 6c5e7a6881 Add department-related interfaces and others (#101)
* Add tool to build tree structure data

* Update to keyword parameter style

* Add department-related interfaces

* Update departmental section interface permissions

* Add TODO and minor fixes

* Fix department relationships

* Fix user foreign key relationship deletion setting

* Add path parameters to the operation log

* Complete todo items

* Update department deletion logic

* Update operation log entry records

* Add AES encryption algorithm

* Add operation log request entry to the secret

* Fix naming prefixes

* Add easy encryption tools

* FIX CASBIN_EXCLUDE typing

* Update user password reset interface

* Add confirm_password to the operation log encryption
2023-06-09 11:00:13 +08:00
Wu Clan 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
Wu Clan 9e833db5f5 Uniform schema class naming convention style. (#98) 2023-06-06 19:48:03 +08:00
Wu Clan bddbf3a1d8 Add os and browser parameters to opera log (#97) 2023-06-06 10:09:43 +08:00
Wu Clan e728a0389b Fix the opera log cost_time parameter (#95) 2023-06-06 10:09:28 +08:00
Wu Clan 465884e82e Fix user authorization lock (#94) 2023-06-05 21:24:08 +08:00
Wu Clan 627208b216 Add operation log related interfaces (#92)
* Add operation log related interfaces

* Update to native ASGI middleware

* add the opera model class to the __init__.py

* Executable code collation

* Reply to the access middleware

* Using the request extension params in the login log

* Fix the whitelist list

* Fix username resolution
2023-06-05 21:23:48 +08:00
Wu Clan 9dce49dab8 Add assertion error handler (#93) 2023-06-05 15:17:43 +08:00
dependabot[bot] ec38c3b7d8 Bump cryptography from 39.0.1 to 41.0.0 (#90)
Bumps [cryptography](https://github.com/pyca/cryptography) from 39.0.1 to 41.0.0.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/39.0.1...41.0.0)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-03 10:08:51 +08:00
Wu Clan 8a18186a7c Add role-related interfaces (#89) 2023-06-03 10:07:55 +08:00
Wu Clan d4f4f3f329 Update docker one-click deployment (#88)
* Update the docker-compose deployment directory and internals

* missed updates

* update readme style
2023-06-02 20:39:26 +08:00
Wu Clan e6640e7936 Fix the merge issues (#87)
* Fix the login log status value.

* Fix config information interface constants

* Add fuzzy paging query for login logs

* Fix fuzzy paging query for query user interface

* Fix jwt middleware internal exception not caught
2023-06-01 16:04:59 +08:00
Wu Clan 61147d4636 Fix background task not executed (#86)
* Fix login auth failure exception

* Add background task to custom exception class

* Fix branch conflicts

* Update login log status to enum.
2023-05-31 16:16:10 +08:00
Wu Clan 14e1e20185 add jwt authentication middleware (#84)
* Add jwt authentication middleware

* Fix branch conflicts
2023-05-31 16:03:44 +08:00
Wu Clan 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
Wu Clan fcc874bbd1 add api module Interfaces (#79)
* Add api module related interfaces

* Add filter to user paging query interface
2023-05-29 10:11:26 +08:00
Wu Clan 16b25c798f add offline ip location resolution (#78) 2023-05-29 10:10:59 +08:00
Wu Clan 926a3f9b4e add different log files (#77) 2023-05-27 22:57:33 +08:00
Wu Clan 4e4c6fbe95 add login logs (#76)
* simplify crud method naming

* update get_user_list to get_select

* add sign in logs

* Perform pre-commit fix

* Encapsulated request ip address resolution

* Delete login log records for uncertain exceptions

* Add login log deletion interface

* Add login logging to background tasks

* update the user agent parse
2023-05-27 22:55:25 +08:00
Wu Clan 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
dylan 4868cb142b update where query (#74) 2023-05-25 18:43:31 +08:00
Wu Clan d8b19705ab add tests exclusion E402 rule (#73) 2023-05-23 19:14:11 +08:00
Wu Clan f65e9abcfd Add apis rate limiter (#72)
* Add apis rate limiter

* update the limiter storage prefix
2023-05-23 18:04:36 +08:00