mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 18:27:19 +00:00
Fix SshHostsTable component
This commit is contained in:
@@ -107,16 +107,20 @@ export const SshHostsTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
{} as Record<string, Set<string>>
|
{} as Record<string, Set<string>>
|
||||||
);
|
);
|
||||||
|
|
||||||
const entriesFromHost = hostMappings.map(({ loginUser, allowedPrincipals }) => ({
|
const entriesFromHost = hostMappings.map(
|
||||||
loginUser,
|
({ loginUser, allowedPrincipals }) => ({
|
||||||
source: LoginMappingSource.HOST,
|
loginUser,
|
||||||
usernames: allowedPrincipals.usernames
|
source: LoginMappingSource.HOST,
|
||||||
}));
|
usernames: allowedPrincipals.usernames
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
const entriesFromGroup = groupMappings
|
const entriesFromGroup = groupMappings
|
||||||
.map(({ loginUser, allowedPrincipals }) => {
|
.map(({ loginUser, allowedPrincipals }) => {
|
||||||
const existing = hostLoginUserToPrincipals[loginUser] || new Set();
|
const existing = hostLoginUserToPrincipals[loginUser] || new Set();
|
||||||
const filteredUsernames = allowedPrincipals.usernames.filter((u) => !existing.has(u));
|
const filteredUsernames = allowedPrincipals.usernames.filter(
|
||||||
|
(u) => !existing.has(u)
|
||||||
|
);
|
||||||
return filteredUsernames.length > 0
|
return filteredUsernames.length > 0
|
||||||
? {
|
? {
|
||||||
loginUser,
|
loginUser,
|
||||||
@@ -233,8 +237,4 @@ export const SshHostsTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
</TableContainer>
|
</TableContainer>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
|
||||||
</TableContainer>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user