LdapUserPermissions.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import React, { FC } from 'react';
  2. import { Icon } from '@grafana/ui';
  3. import { LdapPermissions } from 'app/types';
  4. interface Props {
  5. permissions: LdapPermissions;
  6. }
  7. export const LdapUserPermissions: FC<Props> = ({ permissions }) => {
  8. return (
  9. <div className="gf-form-group">
  10. <div className="gf-form">
  11. <table className="filter-table form-inline">
  12. <thead>
  13. <tr>
  14. <th colSpan={1}>Permissions</th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. <tr>
  19. <td className="width-16"> Grafana admin</td>
  20. <td>
  21. {permissions.isGrafanaAdmin ? (
  22. <>
  23. <Icon name="shield" /> Yes
  24. </>
  25. ) : (
  26. 'No'
  27. )}
  28. </td>
  29. </tr>
  30. <tr>
  31. <td className="width-16">Status</td>
  32. <td>
  33. {permissions.isDisabled ? (
  34. <>
  35. <Icon name="times" /> Inactive
  36. </>
  37. ) : (
  38. <>
  39. <Icon name="check" /> Active
  40. </>
  41. )}
  42. </td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. </div>
  47. </div>
  48. );
  49. };