Skip to content

Commit 3b47df3

Browse files
committed
chore: update parse data filteration
1 parent 0b39572 commit 3b47df3

File tree

1 file changed

+1
-6
lines changed
  • src/Pages/GlobalConfigurations/Authorization

1 file changed

+1
-6
lines changed

src/Pages/GlobalConfigurations/Authorization/utils.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,7 @@ const isRoleCustom = (roleValue: string) =>
410410
export function parseData(dataList: any[], entity: string, accessType?: string) {
411411
switch (entity) {
412412
case EntityTypes.DIRECT:
413-
if (accessType === ACCESS_TYPE_MAP.DEVTRON_APPS) {
414-
return dataList.filter(
415-
(role) => role.accessType === ACCESS_TYPE_MAP.DEVTRON_APPS && !isRoleCustom(role.value),
416-
)
417-
}
418-
return dataList.filter((role) => role.accessType === ACCESS_TYPE_MAP.HELM_APPS && !isRoleCustom(role.value))
413+
return dataList.filter((role) => role.accessType === accessType && !isRoleCustom(role.value))
419414

420415
case EntityTypes.CLUSTER:
421416
case EntityTypes.CHART_GROUP:

0 commit comments

Comments
 (0)