mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-10-04 01:10:40 +00:00
* 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
19 lines
546 B
Python
19 lines
546 B
Python
#!/usr/bin/env python3
|
||
# -*- coding: utf-8 -*-
|
||
import os
|
||
|
||
from pathlib import Path
|
||
|
||
# 获取项目根目录
|
||
# 或使用绝对路径,指到backend目录为止,例如windows:BasePath = D:\git_project\fastapi_mysql\backend
|
||
BasePath = Path(__file__).resolve().parent.parent.parent
|
||
|
||
# 迁移文件存放路径
|
||
Versions = os.path.join(BasePath, 'app', 'alembic', 'versions')
|
||
|
||
# 日志文件路径
|
||
LogPath = os.path.join(BasePath, 'app', 'log')
|
||
|
||
# 离线 IP 数据库路径
|
||
IP2REGION_XDB = os.path.join(BasePath, 'app', 'static', 'ip2region.xdb')
|