refactor(identity): rename authentik_sub to user_sub and authentik_user_id to idp_user_id
This commit is contained in:
@@ -3,11 +3,12 @@
|
||||
## 真實來源
|
||||
- `backend/scripts/init_schema.sql`
|
||||
- 線上增量:`backend/scripts/migrate_add_users_username.sql`
|
||||
- 欄位重命名增量:`backend/scripts/migrate_rename_identity_columns.sql`
|
||||
|
||||
## 主要表
|
||||
- `users`
|
||||
- `authentik_sub` UNIQUE
|
||||
- `authentik_user_id` INTEGER
|
||||
- `user_sub` UNIQUE
|
||||
- `idp_user_id` INTEGER
|
||||
- `username` UNIQUE
|
||||
- `email` UNIQUE
|
||||
- `display_name`
|
||||
@@ -17,7 +18,7 @@
|
||||
- `systems`
|
||||
- `modules`(`system_key -> systems.system_key`)
|
||||
- `permission_groups`
|
||||
- `permission_group_members`(group + authentik_sub)
|
||||
- `permission_group_members`(group + user_sub)
|
||||
- `permission_group_permissions`(group + site/system/module/action)
|
||||
- `user_scope_permissions`(相容保留)
|
||||
- `api_clients`(保留給機器對機器用途)
|
||||
@@ -27,7 +28,7 @@
|
||||
- `action in ('view','edit')`
|
||||
|
||||
## 會員與 Authentik 對齊
|
||||
- `users.authentik_sub` 對應 Authentik `uid`
|
||||
- `users.user_sub` 對應 Authentik `uid`
|
||||
- `users.username` 對應 Authentik `username`
|
||||
- `users.display_name` 對應 Authentik `name`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user