refactor(host): single-source ChannelPolicy, space-signed file grants, whole-file registration
- all authorization rules (owner/creator, per-channel read/write grants, who may remove whom, delete rules, structure management) live in ChannelPolicy; a test fails if they are reimplemented elsewhere - ChannelInfo carries what the caller may do (can_*), member and invitation lists say who can be removed; clients display it and never derive it - the host no longer stores or calls the file service: it only signs short-lived tickets from space permissions (create/put/get/delete/domain), and keeps an opaque fileDomain reference on the channel - a whole file is registered in one request (last frame header + per-frame length and digest) instead of one request per 1 MiB frame; the signed manifest still has to match every digest - drop file quota/threshold, receipts, reconcile and delete-queue code from the host - contract generator emits constants for enums, error codes, token roles, permissions and share states
This commit is contained in:
1 parent
ccb2c074d6
commit
17638b6e20
36 files changed
+926
-589
No files matched your search
+10
-3
@@ -1,10 +1,17 @@
|
||||
<Solution>
|
||||
<Folder Name="/src/">
|
||||
<!-- 主后端(hostAPI):账号、空间、频道、聊天、实时推送,以及内嵌的前端 -->
|
||||
<Folder Name="/src/host/">
|
||||
<Project Path="src/WebDrop.Api/WebDrop.Api.csproj" />
|
||||
<Project Path="src/WebDrop.Core/WebDrop.Core.csproj" />
|
||||
<Project Path="src/WebDrop.Frontend/WebDrop.Frontend.csproj" />
|
||||
</Folder>
|
||||
<!-- 文件服务(fileAPI):另一个进程,只保存超过阈值的大文件 -->
|
||||
<Folder Name="/src/files/">
|
||||
<Project Path="src/WebDrop.FileApi/WebDrop.FileApi.csproj" />
|
||||
<Project Path="src/WebDrop.FileProtocol/WebDrop.FileProtocol.csproj" />
|
||||
<Project Path="src/WebDrop.Frontend/WebDrop.Frontend.csproj" />
|
||||
</Folder>
|
||||
<!-- 两边共用:业务规则、数据库、S3 备份 -->
|
||||
<Folder Name="/src/shared/">
|
||||
<Project Path="src/WebDrop.Core/WebDrop.Core.csproj" />
|
||||
<Project Path="src/WebDrop.Storage/WebDrop.Storage.csproj" />
|
||||
<Project Path="src/WebDrop.Sync/WebDrop.Sync.csproj" />
|
||||
</Folder>
|
||||
|
||||
Reference in new issue
Block a user