Skip to content

fix: add scope (public/private) selection when saving SQL#171

Open
lettimepassby wants to merge 1 commit into
jumpserver:devfrom
lettimepassby:pr@dev@fix_add_scope_(public/private)_selection_when_saving_SQL
Open

fix: add scope (public/private) selection when saving SQL#171
lettimepassby wants to merge 1 commit into
jumpserver:devfrom
lettimepassby:pr@dev@fix_add_scope_(public/private)_selection_when_saving_SQL

Conversation

@lettimepassby

Copy link
Copy Markdown

在 Chen 中保存 SQL 片段时,前端 POST 到 /api/v1/ops/adhocs/ 的请求体里没有 scope 字段。Core 的 AdHocSerializerscope 默认为 public,导致每条保存的 SQL 都变成公有、对所有用户可见,存在数据泄露风险;用户也无法选择可见范围。

改动: SaveSnippetDialog.vue
新增范围单选:私有 / 公有
默认 私有(默认即安全)
创建请求中带上 scope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant