File tree Expand file tree Collapse file tree 7 files changed +41
-17
lines changed Expand file tree Collapse file tree 7 files changed +41
-17
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ export const mySidebar: ThemeSidebarMulti = {
67
67
collapsed : false ,
68
68
items : [
69
69
{ text : '前言' , link : 'before' } ,
70
- { text : '快速开始' , link : 'install' } ,
71
70
]
72
71
} ,
73
72
{
@@ -78,6 +77,13 @@ export const mySidebar: ThemeSidebarMulti = {
78
77
{ text : '插件发布' , link : 'publish' } ,
79
78
]
80
79
} ,
80
+ {
81
+ text : '使用' ,
82
+ collapsed : false ,
83
+ items : [
84
+ { text : '插件安装' , link : 'install' }
85
+ ]
86
+ } ,
81
87
{
82
88
text : '市场' ,
83
89
collapsed : false ,
Original file line number Diff line number Diff line change 9
9
--vp-c-brand-3 : rgba (0 , 148 , 133 , 1 );
10
10
11
11
/* 导航栏分组 */
12
-
13
12
.vp-menu-group {
14
13
.title {
15
14
color : rgba (60 , 60 , 60 , 0.33 );
26
25
--vp-c-brand-3 : rgba (0 , 148 , 133 , 1 );
27
26
28
27
/* 导航栏分组 */
29
-
30
28
.vp-menu-group {
31
29
.title {
32
30
color : rgba (235 , 235 , 235 , 0.38 );
Original file line number Diff line number Diff line change @@ -79,3 +79,12 @@ mode="carousel"
79
79
: space-between ="10"
80
80
: speed ="5000"
81
81
/>
82
+
83
+ <h2 align =" center " style =" border-top : none ; margin-bottom : 24px " >贡献者</h2 >
84
+
85
+ <div align =" center " >
86
+ <a href =" https://github.com/fastapi-practices/fastapi_best_architecture/graphs/contributors " >
87
+ <img src="https://contrib.rocks/image?repo=fastapi-practices/fastapi_best_architecture"/>
88
+ </a ><br >
89
+ <a href =" /fastapi_best_architecture_docs/join.html " style =" font-size : 13px " >加入我们</a >
90
+ </div >
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ title: RBAC
4
4
5
5
我们通过自定义依赖组件,实现了 RBAC 的轻松集成,它可以通过 FastAPI Depends 轻松集成
6
6
7
- ::: warning
8
- 自 fba ` v1.1.2 ` 版本起,开始使用 【角色菜单】作为默认 RBAC 鉴权,Casbin 将作为外置插件进行分发
7
+ ::: caution
8
+ 自 fba [ v1.2.0 ] ( ../../changelog.md ) 版本起,开始将 【角色菜单】作为默认 RBAC 鉴权,Casbin 作为外置插件进行分发
9
9
:::
10
10
11
11
## 角色菜单
@@ -37,8 +37,19 @@ title: RBAC
37
37
38
38
## Casbin
39
39
40
- 此方案是 Go 语言中比较流行的解决方案,它非常灵活,可以通过模型定义多种控制规则,要想实现此 RBAC
41
- 鉴权,请通过 [ 插件市场] ( ../../plugin/market.md ) 获取
40
+ 此方案是 Go 语言中比较流行的解决方案,它非常灵活,可以通过模型定义多种控制规则
41
+
42
+ 要想实现此 RBAC 鉴权,请先 [ 获取插件] ( ../../plugin/market.md ) ,然后执行以下操作
43
+
44
+ ::: steps
45
+
46
+ 1 . 安装插件
47
+
48
+ 2 . 启用鉴权
49
+
50
+ 修改 ` backend/core/conf.py ` 文件中的 ` RBAC_ROLE_MENU_MODE ` 为 ` False `
51
+
52
+ :::
42
53
43
54
## 解耦
44
55
Original file line number Diff line number Diff line change @@ -18,20 +18,20 @@ fba 中的路由遵循 Restful API 规范
18
18
- api 接口
19
19
- v1
20
20
- xxx 子包
21
- - __ init \_\_ .py 在此文件内注册子包内 xxx.py 文件中的路由
21
+ - __ init __ .py 在此文件内注册子包内 xxx.py 文件中的路由
22
22
- xxx.py
23
23
- ...
24
- - __ init \_\_ .py
25
- - router.py 在此文件内注册所有子包 __ init \_\_ .py 文件中的路由
24
+ - __ init __ .py
25
+ - router.py 在此文件内注册所有子包 __ init __ .py 文件中的路由
26
26
- xxx 自定义应用 <Badge type =" warning " text =" 不包含子包 " />
27
27
- api 接口
28
28
- v1
29
- - _ \_ init \_\_ .py 不做任何操作
29
+ - __ init __ .py 不做任何操作
30
30
- xxx.py
31
31
- ...
32
- - __ init \_\_ .py
32
+ - __ init __ .py
33
33
- router.py 在此文件内注册所有 xxx.py 文件中的路由
34
- - __ init \_\_ .py
34
+ - __ init __ .py
35
35
- router.py 在此文件内注册所有 app 目录下 router.py 文件中的路由
36
36
37
37
:::
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ mvc 架构作为常规设计模式,在 python web 中很常见,但是三层
66
66
- api/ 接口
67
67
- crud/ CRUD
68
68
- model 模型
69
- - \_\_ init \_\_ .py 必须在此文件内导入所有模型类
69
+ - __ init __ .py 必须在此文件内导入所有模型类
70
70
- …
71
71
- schema/ 数据传输
72
72
- service/ 服务
Original file line number Diff line number Diff line change @@ -99,13 +99,13 @@ fba 内所有官方实现都同时兼容 mysql 和 postgresql,但我们不对
99
99
- xxx 插件名 <Badge type =" danger " text =" 必须 " />
100
100
- api/ 接口 <Badge type =" danger " text =" 必须 " />
101
101
- crud/ CRUD <Badge type =" warning " text =" 非必须 " />
102
- - model/ 模型 <Badge type =" warning " text =" 非必须 " />
103
- - \_\_ init \_\_ .py 在此文件内导入所有模型类 <Badge type =" danger " text =" 必须 " />
102
+ - model 模型 <Badge type =" warning " text =" 非必须 " />
103
+ - __ init __ .py 在此文件内导入所有模型类 <Badge type =" danger " text =" 必须 " />
104
104
- …
105
105
- schema/ 数据传输 <Badge type =" warning " text =" 非必须 " />
106
106
- service/ 服务 <Badge type =" warning " text =" 非必须 " />
107
107
- utils/ 工具包 <Badge type =" warning " text =" 非必须 " />
108
- - \_\_ init \_\_ .py 作为 python 包保留 <Badge type =" danger " text =" 必须 " />
108
+ - __ init __ .py 作为 python 包保留 <Badge type =" danger " text =" 必须 " />
109
109
- conf.py 插件独立配置 <Badge type =" warning " text =" 非必须 " />
110
110
- … 更多其他配置,例如 enums.py... <Badge type =" warning " text =" 非必须 " />
111
111
- plugin.toml 插件配置文件 <Badge type =" danger " text =" 必须 " />
You can’t perform that action at this time.
0 commit comments