Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

考虑将syncMode的权限进行拆分实现更细颗粒的控制? #412

Closed
hezhengxu2018 opened this issue Feb 24, 2023 · 3 comments · Fixed by #434
Closed

考虑将syncMode的权限进行拆分实现更细颗粒的控制? #412

hezhengxu2018 opened this issue Feb 24, 2023 · 3 comments · Fixed by #434
Labels

Comments

@hezhengxu2018
Copy link
Collaborator

目前syncMode不仅仅是控制是否创建schedule进行更新的配置项,同时也是是否能创建同步任务的配置项。
即如果syncMode为none的情况下虽然不会自动创建同步任务也无法通过sync的接口手动创建同步任务了。

拆分后syncMode仅影响schedule的创建,enableSync的值应该由独立的配置项控制,可以在不主动开启定时任务的情况下手动创建特定的同步任务。

这项修改也是为了之后创建同步指定版本任务的功能,在syncMode是none的情况下可以通过开启enableSync手动同步指定版本。在syncMode是all或者exist时同步指定版本意义不大。

@hezhengxu2018
Copy link
Collaborator Author

或者新增一个配置项控制是否允许手动创建同步任务,让PackageSyncConttoller的同步与同步任务的创建分离,实现不会主动创建同步任务的情况下也可以手动的同步某一个某一个包甚至是某一个包的某一个版本。

@hezhengxu2018
Copy link
Collaborator Author

同步任务的执行使用单独的配置项allowExecuteSyncTask控制,是否开启sync controller使用单独的配置项enableSyncController。将同步任务的自动创建方式(syncMode)与同步任务的执行分离,在私有化部署时可以实现更细颗粒的控制。
例如在syncMode=none时只要开启allowExecuteSyncTask用户可以通过sync controller创建同步任务更新内网依赖。或者更严格的关闭enableSyncController仅允许管理员创建同步任务,保证内网同步下来的依赖是经过管理员认可的。

fengmk2 pushed a commit that referenced this issue Apr 6, 2023
fengmk2 pushed a commit that referenced this issue Apr 6, 2023
[skip ci]

## [3.12.0](v3.11.2...v3.12.0) (2023-04-06)

### Features

* allow admin to sync package only ([#434](#434)) ([c5ac715](c5ac715)), closes [#412](#412)
@github-actions
Copy link

github-actions bot commented Apr 6, 2023

🎉 This issue has been resolved in version 3.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant