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

私有部署模式没有拦截非 scoped package 发布 #508

Closed
fengmk2 opened this issue Jun 11, 2023 · 4 comments
Closed

私有部署模式没有拦截非 scoped package 发布 #508

fengmk2 opened this issue Jun 11, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@fengmk2
Copy link
Member

fengmk2 commented Jun 11, 2023

image

@fengmk2 fengmk2 added the bug Something isn't working label Jun 11, 2023
@elrrrrrrr
Copy link
Member

当前账户是管理员,或者之前发布过这个包吗?
https://github.com/cnpm/cnpmcore/blob/master/app/port/UserRoleManager.ts#L79

image
本地试了下没重现 🤔

@fengmk2
Copy link
Member Author

fengmk2 commented Jun 11, 2023

当前账户是管理员,或者之前发布过这个包吗? https://github.com/cnpm/cnpmcore/blob/master/app/port/UserRoleManager.ts#L79

image 本地试了下没重现 🤔

https://github.com/cnpm/cnpmcore/pull/509/files#r1225793097

@elrrrrrrr
Copy link
Member

@fengmk2

按照之前的设计 无 scope 的公网包也允许内部进行覆盖,主要基于一下考虑

  1. 公网包可能出现预期外的 unpublish 或者误删除的情况 ref
  2. 有一些无scope的内网包 ref
    无 scope 的公网包目前只允许管理员新增,覆盖后也不会再从源进行同步

之前设置了 allowPublishNonScopePackage 用以限制普通用户。

管理员 普通用户
开关打开 ✅ 存量包 ✅ 存量包
✅ 新增包 ✅ 新增包
开关关闭 ✅ 存量包 ✅ 存量包
✅ 新增包 ❎ 新增包

后续我们修改为管理员也受这个配置限制?

@fengmk2
Copy link
Member Author

fengmk2 commented Jun 23, 2023

那先不管了,看起来是 by design

@fengmk2 fengmk2 closed this as completed Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants