Workspace members with only the 'App Template Viewing' permission are allowed to replace Helm charts
Created by: patrickluoyu
Describe the bug Workspace members with only the 'App Template Viewing' permission are allowed to replace Helm charts.
Versions used(KubeSphere/Kubernetes) KubeSphere: v3.3.0-rc.0
To Reproduce Steps to reproduce the behavior:
- Create a user and assign the role 'platform-regular' to the user.
- In a workspace, create a role 'test' and assign only the permission 'App Template Viewing' to the role.
- Invite the user to the workspace and assign the role 'test' to the user.
- Log in as the user and go to the app template details page. The user is allowed to click 'Upload' and change the Helm chart of an app version.
Expected behavior Workspace members with only the 'App Template Viewing' permission should not be allowed to replace Helm charts.
/assign @harrisonliu5 @wansir