feat(app): support app resource permission snapshots and runtime authorization - #7559
Conversation
Coverage Report
File CoverageNo changed files found. |
|
✅ Admin Preview Image Ready! 🕒 Time: 2026-09-17 17:12:32 (UTC+8) |
bff8b71 to
e7a5d50
Compare
|
✅ Build and publish successful - Preview fastgpt Image: 🕒 Time: 2026-09-17 17:13:50 (UTC+8) |
f2f0d5f to
f9b9a95
Compare
d58da43 to
b49afa8
Compare
8c0a582 to
6fc5922
Compare
ae2357e to
76f1083
Compare
|
检查了最新提交
另外,即使权限查询异常改为向上抛出,最终 validation 仍会通过 建议补充至少三类测试:明确无权限时过滤资源、Mongo/权限查询异常时不写 |
|
基于最新 head e7b67dc,补充 review:
结论:第 1、2 点需要修复;第 3 点是迁移失败信息完整性问题;第 4 点是当前 CI/架构测试阻塞项。 |
…orization
feat(app): complete resource permission checks and runtime authorization
feat(app): complete resource permission checks and runtime authorization
feat(app): optimize resource migration batching and support system skill authorization
feat(app): migrate workflow state to versions and enforce resource permissions
fix(app): complete version workflow resource migration
fix(app): align resource lookup id queries
fix(app): align resource lookup id queries
feat(resource): missing workflow resources
feat: resource ACL markers and draft concurrency
Introduce resource-level permission markers and optimistic draft checks.
- Add permissionDenied flag to resource/type schemas (skills, datasets, tools) and propagate through rewriteAppWorkflowToDetail.
- Perform viewer-side permission hints for snapshot-external resources; normalize child tool ids into parent tool snapshot entries.
- Treat invalid stored snapshots as empty to avoid bypassing publish-time ACL checks; resolveStoredAppResources now merges and normalizes legacy ids.
- Publish API accepts draftVersionId for optimistic concurrency and enforces matchedCount checks on updates (autoSave & publish).
- Load draft chatConfig for workflow debug when client omits it.
- Frontend: show permission-denied UI, workflow check supports resource_no_permission.
- Tests updated/added to cover behaviors.
feat(app): replace draftVersionId pointer with latest-version reads
fix: CAS update for published app version
fix(app): tighten resource permission and model extraction
feat(app): enforce model resource permissions and preserve legacy fields
- Integrate AI models into standard app resource ACL permissions and simplify model snapshot format to { type: 'model', id }
- Validate model resources at workflow node dispatch boundary and standalone auxiliary endpoints (createQuestionGuide, getSpeech)
- Align tool runtime with version workflow and restore dataset search model imports
- Align getUnauthorizedAppResources with standard auth helpers (authAppByTmbId, authDatasetByTmbId, authSkillByTmbId)
- Preserve legacy workflow fields (modules, edges, chatConfig, resourceRefs) during 4163 migration for rollback compatibility
- Retain backward-compatible modules field in CreateAppBodySchema and AppDetailType
- Add and update test suites for model permissions, question guide, speech synthesis, and migration
fix(app): align form app resource validation and error prompts fix(app): preserve workflow entry point schema refactor(app): consolidate resource error states and extract SkillCard fix(app): align resource tests with model handles fix(app): resolve upstream rebase integration fix(app): resolve upstream rebase integration fix(app): handle soft-deleted resource auth and align tool error handling fix(app): support app baseline in model summary and smooth selector reload
fix(workflow): authorize dynamic runtime toolset by running user fix(app): fallback to cached models when resolving legacy app resources chore(app): update Pro resource permission runtime refactor(workflow): JIT on-demand loading for static resources
…4.17.1 - Move app resource snapshot backfill migration task to 4.17.1 - Aggregate legacy MCP child apps into parent published Version toolSet nodes during migration - Provide runtime backward compatibility in getMCPChildren for legacy child apps - Skip scanning and validation on child apps with parentId
chore: update pro submodule
- Support delay option on SystemMigration registry protocol and forbid delay on blocking startup migrations - Add SYSTEM_MIGRATION_DELAY_SECONDS environment variable to configure delay duration in seconds - Delay execution in Runner with active heartbeat lease renewal and signal abort support - Configure delay: true on 20260916_backfill_app_resource_snapshots - Update environment variable documentation, .env.template, and unit tests
No description provided.