Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/components/shared/modals/ResourceDetailsAccessPolicyTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,16 @@ export const AccessPolicyTable = <T extends AccessPolicyTabFormikProps>({
return newRole;
};

// Filter available options by custom prefixes from the config
if (aclDefaults) {
if (aclDefaults["display_role_filter_prefixes"]) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter is unambiguous. Is it "filter out" or "filter for". Maybe change the config name to display_role_filter_blacklist_prefixes?

const prefixes = aclDefaults["display_role_filter_prefixes"].split(",");
rolesFilteredbyPolicies = rolesFilteredbyPolicies.filter(role =>
!prefixes.some(prefix => role.name.startsWith(prefix)),
);
}
}

return (
<>
{/* list of policy details and interface for changing them */}
Expand Down
Loading