feat(flow): unify member-group-permission admin workflow and docs
This commit is contained in:
@@ -61,26 +61,48 @@ Headers:
|
||||
- `X-Client-Key`
|
||||
- `X-API-Key`
|
||||
|
||||
- `GET/POST /admin/systems`
|
||||
- `GET/POST /admin/modules`
|
||||
- `GET/POST /admin/companies`
|
||||
- `GET/POST /admin/sites`
|
||||
- `GET/POST/PATCH /admin/systems`
|
||||
- `GET/POST/PATCH /admin/modules`
|
||||
- `GET/POST/PATCH /admin/companies`
|
||||
- `GET/POST/PATCH /admin/sites`
|
||||
- `GET /admin/members`
|
||||
- `POST /admin/members/upsert`
|
||||
- `PATCH /admin/members/{authentik_sub}`
|
||||
|
||||
## 4. 權限群組(一組權限綁多個 user)
|
||||
## 4. 會員與群組關聯(由會員頁管理)
|
||||
Headers:
|
||||
- `X-Client-Key`
|
||||
- `X-API-Key`
|
||||
|
||||
- `GET/POST /admin/permission-groups`
|
||||
- `POST /admin/permission-groups/{group_key}/members/{authentik_sub}`
|
||||
- `DELETE /admin/permission-groups/{group_key}/members/{authentik_sub}`
|
||||
- `GET /admin/members/{authentik_sub}/permission-groups`
|
||||
- `PUT /admin/members/{authentik_sub}/permission-groups`
|
||||
```json
|
||||
{
|
||||
"group_keys": ["site-ops", "mkt-admin"]
|
||||
}
|
||||
```
|
||||
|
||||
## 5. 權限群組(一組權限可綁多個 user)
|
||||
Headers:
|
||||
- `X-Client-Key`
|
||||
- `X-API-Key`
|
||||
|
||||
- `GET/POST/PATCH /admin/permission-groups`
|
||||
- `GET /admin/permission-groups/{group_key}/permissions`
|
||||
- `POST /admin/permission-groups/{group_key}/permissions/grant`
|
||||
- `POST /admin/permission-groups/{group_key}/permissions/revoke`
|
||||
|
||||
群組授權 payload 與 user 授權 payload 相同(用 `system/module/scope/action`)。
|
||||
|
||||
## 5. Internal 查詢 API(其他系統)
|
||||
## 6. 直接授權列表(權限管理頁)
|
||||
Headers:
|
||||
- `X-Client-Key`
|
||||
- `X-API-Key`
|
||||
|
||||
- `GET /admin/permissions/direct?keyword=&scope_type=&limit=&offset=`
|
||||
- `DELETE /admin/permissions/direct/{permission_id}`
|
||||
|
||||
## 7. Internal 查詢 API(其他系統)
|
||||
Headers:
|
||||
- `X-Internal-Secret`
|
||||
|
||||
@@ -91,10 +113,11 @@ Headers:
|
||||
- `GET /internal/members`
|
||||
- `GET /internal/permissions/{authentik_sub}/snapshot`
|
||||
|
||||
## 6. 常見錯誤
|
||||
## 8. 常見錯誤
|
||||
- `401 invalid_client`
|
||||
- `401 invalid_api_key`
|
||||
- `401 invalid_internal_secret`
|
||||
- `404 system_not_found`
|
||||
- `404 company_not_found`
|
||||
- `404 site_not_found`
|
||||
- `400 invalid_permission_id`
|
||||
|
||||
Reference in New Issue
Block a user