为自动切分命令增加项目写权限校验
在启动分离工作流前复用 asset.register 权限门禁。
This commit is contained in:
@@ -334,6 +334,8 @@ async fn separate_ui(
|
||||
asset_id: String,
|
||||
state: ui_editor::state::State,
|
||||
) -> Result<ui_editor::commands::SeparationDTO, String> {
|
||||
let root = Path::new(project_path.trim());
|
||||
enforce_project_permission_policy(root, "asset.register")?;
|
||||
ui_editor::commands::separate_ui_impl(project_path, asset_id, state).await
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user