apolloconfig / apollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
https://www.apolloconfig.com
Apache License 2.0
29.2k stars 10.21k forks source link

新建应用时权限赋予错误 #5181

Closed Lin-1997 closed 3 months ago

Lin-1997 commented 4 months ago

Describe the bug A用户新建一个应用,将应用负责人、应用管理员都仅设置为B用户。此时也为A用户赋予了默认namespace的编辑、发布权限,不应该给A用户任何权限的。

To Reproduce Steps to reproduce the behavior: 1.新建一个应用,将应用负责人、应用管理员都仅设置为B用户

Expected behavior A用户没有任何权限

Additional Details & Logs

https://github.com/apolloconfig/apollo/blob/49bd8ccab93c2484dacabd9d0709bb49efbdfc4b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/defaultimpl/DefaultRoleInitializationService.java#L83-L89

应该赋权限给用户Sets.newHashSet(app.getOwnerName()),而不是Sets.newHashSet(operator)

nobodyiam commented 4 months ago

I believe this is a bug, would you please help to submit a pull request to fix it?

Lin-1997 commented 4 months ago

I believe this is a bug, would you please help to submit a pull request to fix it?

see this https://github.com/apolloconfig/apollo/pull/5191