fix export cve permission issue (#21325)

The export CVE permission should be included in the project scope, as the API relies on project-level judgment.

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
Wang Yan 2024-12-17 14:52:21 +08:00 committed by GitHub
parent af63122bb7
commit e417875377
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -133,9 +133,6 @@ func (n *NolimitProvider) GetPermissions(s scope) []*types.Policy {
&types.Policy{Resource: ResourceLdapUser, Action: ActionCreate}, &types.Policy{Resource: ResourceLdapUser, Action: ActionCreate},
&types.Policy{Resource: ResourceLdapUser, Action: ActionList}, &types.Policy{Resource: ResourceLdapUser, Action: ActionList},
&types.Policy{Resource: ResourceExportCVE, Action: ActionCreate},
&types.Policy{Resource: ResourceExportCVE, Action: ActionRead},
&types.Policy{Resource: ResourceQuota, Action: ActionUpdate}, &types.Policy{Resource: ResourceQuota, Action: ActionUpdate},
&types.Policy{Resource: ResourceUserGroup, Action: ActionCreate}, &types.Policy{Resource: ResourceUserGroup, Action: ActionCreate},
@ -151,6 +148,9 @@ func (n *NolimitProvider) GetPermissions(s scope) []*types.Policy {
&types.Policy{Resource: ResourceRobot, Action: ActionList}, &types.Policy{Resource: ResourceRobot, Action: ActionList},
&types.Policy{Resource: ResourceRobot, Action: ActionDelete}, &types.Policy{Resource: ResourceRobot, Action: ActionDelete},
&types.Policy{Resource: ResourceExportCVE, Action: ActionCreate},
&types.Policy{Resource: ResourceExportCVE, Action: ActionRead},
&types.Policy{Resource: ResourceMember, Action: ActionCreate}, &types.Policy{Resource: ResourceMember, Action: ActionCreate},
&types.Policy{Resource: ResourceMember, Action: ActionRead}, &types.Policy{Resource: ResourceMember, Action: ActionRead},
&types.Policy{Resource: ResourceMember, Action: ActionUpdate}, &types.Policy{Resource: ResourceMember, Action: ActionUpdate},