LdapUserInfo.tsx 966 B

1234567891011121314151617181920212223242526
  1. import React, { FC } from 'react';
  2. import { LdapUserMappingInfo } from './LdapUserMappingInfo';
  3. import { LdapUserPermissions } from './LdapUserPermissions';
  4. import { LdapUserGroups } from './LdapUserGroups';
  5. import { LdapUserTeams } from './LdapUserTeams';
  6. import { LdapUser } from 'app/types';
  7. interface Props {
  8. ldapUser: LdapUser;
  9. showAttributeMapping?: boolean;
  10. }
  11. export const LdapUserInfo: FC<Props> = ({ ldapUser, showAttributeMapping }) => {
  12. return (
  13. <>
  14. <LdapUserMappingInfo info={ldapUser.info} showAttributeMapping={showAttributeMapping} />
  15. <LdapUserPermissions permissions={ldapUser.permissions} />
  16. {ldapUser.roles && ldapUser.roles.length > 0 && (
  17. <LdapUserGroups groups={ldapUser.roles} showAttributeMapping={showAttributeMapping} />
  18. )}
  19. {ldapUser.teams && ldapUser.teams.length > 0 && (
  20. <LdapUserTeams teams={ldapUser.teams} showAttributeMapping={showAttributeMapping} />
  21. )}
  22. </>
  23. );
  24. };